Advertisement
Guest User

Untitled

a guest
Jul 28th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. UIView *statsView = [[UIView alloc] initWithFrame:CGRectMake(10, 130, 200, 12)];
  2.  
  3. for (UIButton* v in [statsView subviews]) {
  4. v.translatesAutoresizingMaskIntoConstraints = NO;
  5. [statsView addSubview:v];
  6. }
  7. NSDictionary *views = @{@"reposts": v1,
  8. @"likes": v2,
  9. @"comments": v3
  10. };
  11. [statsView addConstraints:[NSLayoutConstraint
  12. constraintsWithVisualFormat:@"H:|[reposts][likes][comments]"
  13. options:NSLayoutFormatAlignAllTop| NSLayoutFormatAlignAllBottom
  14. metrics:0
  15. views:views]];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement