setupview added to initialiser method
This commit is contained in:
parent
af3feae828
commit
d2c489811b
@ -183,6 +183,7 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
|
||||
- (instancetype)initWithCoder:(NSCoder *)coder {
|
||||
self = [super initWithCoder:coder];
|
||||
if (self) {
|
||||
[self setupView];
|
||||
[self setupWithCheckedColor:[UIColor whiteColor] unCheckColor:[UIColor whiteColor] text:nil];
|
||||
[self addAccessibleProperties];
|
||||
}
|
||||
@ -192,6 +193,7 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self setupView];
|
||||
[self setupWithCheckedColor:[UIColor whiteColor] unCheckColor:[UIColor whiteColor] text:nil];
|
||||
[self addAccessibleProperties];
|
||||
}
|
||||
@ -243,6 +245,7 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
|
||||
[self.checkMark.centerXAnchor constraintEqualToAnchor:self.checkedSquare.centerXAnchor].active = YES;
|
||||
[self.checkMark.centerYAnchor constraintEqualToAnchor:self.checkedSquare.centerYAnchor].active = YES;
|
||||
} else {
|
||||
[self.checkMark removeFromSuperview];
|
||||
[self.checkedSquare addSubview:self.checkMark];
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user