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 {
|
- (instancetype)initWithCoder:(NSCoder *)coder {
|
||||||
self = [super initWithCoder:coder];
|
self = [super initWithCoder:coder];
|
||||||
if (self) {
|
if (self) {
|
||||||
|
[self setupView];
|
||||||
[self setupWithCheckedColor:[UIColor whiteColor] unCheckColor:[UIColor whiteColor] text:nil];
|
[self setupWithCheckedColor:[UIColor whiteColor] unCheckColor:[UIColor whiteColor] text:nil];
|
||||||
[self addAccessibleProperties];
|
[self addAccessibleProperties];
|
||||||
}
|
}
|
||||||
@ -192,6 +193,7 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
|
|||||||
- (instancetype)initWithFrame:(CGRect)frame {
|
- (instancetype)initWithFrame:(CGRect)frame {
|
||||||
self = [super initWithFrame:frame];
|
self = [super initWithFrame:frame];
|
||||||
if (self) {
|
if (self) {
|
||||||
|
[self setupView];
|
||||||
[self setupWithCheckedColor:[UIColor whiteColor] unCheckColor:[UIColor whiteColor] text:nil];
|
[self setupWithCheckedColor:[UIColor whiteColor] unCheckColor:[UIColor whiteColor] text:nil];
|
||||||
[self addAccessibleProperties];
|
[self addAccessibleProperties];
|
||||||
}
|
}
|
||||||
@ -243,6 +245,7 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
|
|||||||
[self.checkMark.centerXAnchor constraintEqualToAnchor:self.checkedSquare.centerXAnchor].active = YES;
|
[self.checkMark.centerXAnchor constraintEqualToAnchor:self.checkedSquare.centerXAnchor].active = YES;
|
||||||
[self.checkMark.centerYAnchor constraintEqualToAnchor:self.checkedSquare.centerYAnchor].active = YES;
|
[self.checkMark.centerYAnchor constraintEqualToAnchor:self.checkedSquare.centerYAnchor].active = YES;
|
||||||
} else {
|
} else {
|
||||||
|
[self.checkMark removeFromSuperview];
|
||||||
[self.checkedSquare addSubview:self.checkMark];
|
[self.checkedSquare addSubview:self.checkMark];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user