From 45dde90fdcef4340a1ceadc0f6d492cbbc8478c6 Mon Sep 17 00:00:00 2001 From: "Suresh, Kamlesh" Date: Tue, 14 May 2019 09:52:52 -0400 Subject: [PATCH] review --- MVMCoreUI/Atoms/Views/MFView.h | 3 --- MVMCoreUI/Atoms/Views/MVMCoreUICheckBox.m | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/MVMCoreUI/Atoms/Views/MFView.h b/MVMCoreUI/Atoms/Views/MFView.h index 243408ac..5e32ff0a 100644 --- a/MVMCoreUI/Atoms/Views/MFView.h +++ b/MVMCoreUI/Atoms/Views/MFView.h @@ -10,11 +10,8 @@ #import @import MVMCore.MVMCoreViewProtocol; -@class FormValidator; - @interface MFView : UIView -//@property (nullable, strong, nonatomic) FormValidator *formValidator; @property (nullable, nonatomic, strong) NSDictionary *json; // Called in the initialization functions. Can setup ui here. diff --git a/MVMCoreUI/Atoms/Views/MVMCoreUICheckBox.m b/MVMCoreUI/Atoms/Views/MVMCoreUICheckBox.m index ff46aa6a..76f2d0f6 100644 --- a/MVMCoreUI/Atoms/Views/MVMCoreUICheckBox.m +++ b/MVMCoreUI/Atoms/Views/MVMCoreUICheckBox.m @@ -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];