use molecule label
This commit is contained in:
parent
668d42176a
commit
9709c7195d
@ -62,9 +62,17 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
|
||||
|
||||
UIColor *checkedColor = checkedColorHex ? [UIColor mfGetColorForHex:checkedColorHex]: [UIColor blackColor];
|
||||
UIColor *unCheckedColor = unCheckedColorHex ? [UIColor mfGetColorForHex:unCheckedColorHex]: [UIColor clearColor];
|
||||
|
||||
NSString *label = [json string:KeyLabel];
|
||||
|
||||
[self setupWithCheckedColor:checkedColor unCheckColor:unCheckedColor text:label];
|
||||
if (label) {
|
||||
[self setupWithCheckedColor:checkedColor unCheckColor:unCheckedColor text:label];
|
||||
} else {
|
||||
[self setupWithCheckedColor:checkedColor
|
||||
unCheckColor:unCheckedColor
|
||||
label:[json dict:KeyLabel]
|
||||
delegateObject:delegateObject
|
||||
additionalData: additionalData];
|
||||
}
|
||||
}
|
||||
|
||||
+ (instancetype)mfCheckBox {
|
||||
@ -246,17 +254,26 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupWithCheckedColor:(UIColor *)checkedColor unCheckColor:(UIColor *)unCheckedColor {
|
||||
[self setupView];
|
||||
if (checkedColor) {
|
||||
self.checkedColor = checkedColor;
|
||||
}
|
||||
if (unCheckedColor) {
|
||||
self.unCheckedColor = unCheckedColor;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupWithCheckedColor:(UIColor *)checkedColor unCheckColor:(UIColor *)unCheckedColor text:(NSString *)text {
|
||||
[self setupView];
|
||||
if (checkedColor) {
|
||||
self.checkedColor = checkedColor;
|
||||
}
|
||||
if (unCheckedColor) {
|
||||
self.unCheckedColor = unCheckedColor;
|
||||
}
|
||||
[self setupWithCheckedColor:checkedColor unCheckColor:unCheckedColor];
|
||||
[self setDescriptionText:text];
|
||||
}
|
||||
|
||||
- (void)setupWithCheckedColor:(UIColor *)checkedColor unCheckColor:(UIColor *)unCheckedColor label:(NSDictionary *)labelJson delegateObject:(DelegateObject *)delegateObject additionalData:(NSDictionary *)additionalData{
|
||||
[self setupWithCheckedColor:checkedColor unCheckColor:unCheckedColor];
|
||||
[self.descriptionLabel setWithJSON:labelJson delegateObject:delegateObject additionalData:additionalData];
|
||||
}
|
||||
|
||||
- (void)updateView:(CGFloat)size {
|
||||
[MVMCoreDispatchUtility performBlockOnMainThread:^{
|
||||
[self.descriptionLabel updateView:size];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user