Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UIView *statsView = [[UIView alloc] initWithFrame:CGRectMake(10, 130, 200, 12)];
- for (UIButton* v in [statsView subviews]) {
- v.translatesAutoresizingMaskIntoConstraints = NO;
- [statsView addSubview:v];
- }
- NSDictionary *views = @{@"reposts": v1,
- @"likes": v2,
- @"comments": v3
- };
- [statsView addConstraints:[NSLayoutConstraint
- constraintsWithVisualFormat:@"H:|[reposts][likes][comments]"
- options:NSLayoutFormatAlignAllTop| NSLayoutFormatAlignAllBottom
- metrics:0
- views:views]];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement