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 *checkedColor = checkedColorHex ? [UIColor mfGetColorForHex:checkedColorHex]: [UIColor blackColor];
|
||||||
UIColor *unCheckedColor = unCheckedColorHex ? [UIColor mfGetColorForHex:unCheckedColorHex]: [UIColor clearColor];
|
UIColor *unCheckedColor = unCheckedColorHex ? [UIColor mfGetColorForHex:unCheckedColorHex]: [UIColor clearColor];
|
||||||
|
|
||||||
NSString *label = [json string:KeyLabel];
|
NSString *label = [json string:KeyLabel];
|
||||||
|
if (label) {
|
||||||
[self setupWithCheckedColor:checkedColor unCheckColor:unCheckedColor text:label];
|
[self setupWithCheckedColor:checkedColor unCheckColor:unCheckedColor text:label];
|
||||||
|
} else {
|
||||||
|
[self setupWithCheckedColor:checkedColor
|
||||||
|
unCheckColor:unCheckedColor
|
||||||
|
label:[json dict:KeyLabel]
|
||||||
|
delegateObject:delegateObject
|
||||||
|
additionalData: additionalData];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (instancetype)mfCheckBox {
|
+ (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 {
|
- (void)setupWithCheckedColor:(UIColor *)checkedColor unCheckColor:(UIColor *)unCheckedColor text:(NSString *)text {
|
||||||
[self setupView];
|
[self setupWithCheckedColor:checkedColor unCheckColor:unCheckedColor];
|
||||||
if (checkedColor) {
|
|
||||||
self.checkedColor = checkedColor;
|
|
||||||
}
|
|
||||||
if (unCheckedColor) {
|
|
||||||
self.unCheckedColor = unCheckedColor;
|
|
||||||
}
|
|
||||||
[self setDescriptionText:text];
|
[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 {
|
- (void)updateView:(CGFloat)size {
|
||||||
[MVMCoreDispatchUtility performBlockOnMainThread:^{
|
[MVMCoreDispatchUtility performBlockOnMainThread:^{
|
||||||
[self.descriptionLabel updateView:size];
|
[self.descriptionLabel updateView:size];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user