using MVMCoreUIDelegateObject
This commit is contained in:
parent
725a0a914f
commit
0abefbcdc0
@ -59,6 +59,4 @@
|
||||
- (void)setValueForAccessibilityText:(nullable NSString *)text;
|
||||
- (void)hideDescriptionLabelAndPinCheckboxToRight;
|
||||
|
||||
- (void)setWithJSON:(nullable NSDictionary *)json delegate:(nullable NSObject *)delegate additionalData:(nullable NSDictionary *)additionalData;
|
||||
|
||||
@end
|
||||
|
||||
@ -43,7 +43,7 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
|
||||
|
||||
@property (nonatomic) BOOL isRequired;
|
||||
@property (nullable, strong, nonatomic) NSString *fieldKey;
|
||||
@property (nullable, weak) id <FormValidationProtocol> delegate;
|
||||
@property (nullable, weak) DelegateObject *delegate;
|
||||
|
||||
@end
|
||||
|
||||
@ -51,9 +51,10 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
|
||||
|
||||
#pragma mark - convenient class methods
|
||||
|
||||
- (void)setWithJSON:(nullable NSDictionary *)json delegate:(nullable NSObject *)delegate additionalData:(nullable NSDictionary *)additionalData {
|
||||
[FormValidator setupValidationWithMolecule:self delegate:(id<FormValidationProtocol>)delegate];
|
||||
self.delegate = (id<FormValidationProtocol>)delegate;
|
||||
- (void)setWithJSON:(NSDictionary *)json delegateObject:(DelegateObject *)delegateObject additionalData:(NSDictionary *)additionalData {
|
||||
|
||||
[FormValidator setupValidationWithMolecule:self delegate:((MVMCoreUIDelegateObject *)delegateObject).formValidationProtocol];
|
||||
self.delegate = delegateObject;
|
||||
self.fieldKey = [json stringForKey:KeyFieldKey];
|
||||
self.isRequired = [json boolForKey:KeyRequired];
|
||||
|
||||
@ -312,7 +313,7 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
|
||||
[self.checkMark updateCheckSelected:NO animated:animated];
|
||||
}
|
||||
|
||||
FormValidator *formValidator = [FormValidator getFormValidatorForDelegate:self.delegate];
|
||||
FormValidator *formValidator = [FormValidator getFormValidatorForDelegate:((MVMCoreUIDelegateObject *)self.delegate).formValidationProtocol];
|
||||
[formValidator enableByValidation];
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user