This commit is contained in:
Suresh, Kamlesh 2019-05-14 09:52:52 -04:00
parent 8d2f5e1de0
commit 45dde90fdc
2 changed files with 5 additions and 4 deletions

View File

@ -10,11 +10,8 @@
#import <MVMCoreUI/MVMCoreUIMoleculeViewProtocol.h>
@import MVMCore.MVMCoreViewProtocol;
@class FormValidator;
@interface MFView : UIView <MVMCoreViewProtocol, MVMCoreUIMoleculeViewProtocol>
//@property (nullable, strong, nonatomic) FormValidator *formValidator;
@property (nullable, nonatomic, strong) NSDictionary *json;
// Called in the initialization functions. Can setup ui here.

View File

@ -60,7 +60,11 @@ static const CGFloat CheckBoxHeightWidth = 18.0;
- (void)setWithJSON:(NSDictionary *)json delegateObject:(DelegateObject *)delegateObject additionalData:(NSDictionary *)additionalData {
[FormValidator setupValidationWithMolecule:self delegate:((MVMCoreUIDelegateObject *)delegateObject).formValidationProtocol];
if ([delegateObject isKindOfClass:[MVMCoreUIDelegateObject class]]) {
[FormValidator setupValidationWithMolecule:self delegate:((MVMCoreUIDelegateObject *)delegateObject).formValidationProtocol];
}
self.delegate = delegateObject;
self.fieldKey = [json stringForKey:KeyFieldKey];
self.isRequired = [json boolForKey:KeyRequired];