| 12345678910111213141516171819202122232425262728293031 |
- #import "BTUIKCollectionReusableView.h"
- #import "BTUIKAppearance.h"
- @implementation BTUIKCollectionReusableView
- - (instancetype)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self) {
- self.label = [[UILabel alloc] init];
- self.label.translatesAutoresizingMaskIntoConstraints = NO;
- self.label.textAlignment = NSTextAlignmentCenter;
- self.label.font = [[BTUIKAppearance sharedInstance].font fontWithSize:12];
- self.label.textColor = [BTUIKAppearance sharedInstance].secondaryTextColor;
- [self addSubview:self.label];
-
- [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[label]|"
- options:0
- metrics:nil
- views:@{@"label":self.label}]];
-
- [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[label]|"
- options:0
- metrics:nil
- views:@{@"label":self.label}]];
-
- }
- return self;
- }
- @end
|