small formatting fixes
This commit is contained in:
parent
63f02a0c7c
commit
df67ded57b
@ -13,8 +13,6 @@
|
||||
#import "MFStyler.h"
|
||||
#import "UIColor+MFConvenience.h"
|
||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||
|
||||
|
||||
@import MVMCore.MVMCoreDispatchUtility;
|
||||
@import MVMCore.MVMCoreGetterUtility;
|
||||
@import MVMCore.NSDictionary_MFConvenience;
|
||||
|
||||
@ -127,6 +127,7 @@
|
||||
|
||||
- (void)setAccessibilityString:(nullable NSString *)accessibilityString;
|
||||
|
||||
// For Validator Protocol
|
||||
- (nullable NSString *)formFieldName;
|
||||
- (nullable id)formFieldValue;
|
||||
|
||||
|
||||
@ -15,9 +15,7 @@
|
||||
#import "MFLabel.h"
|
||||
#import "MVMCoreUIUtility.h"
|
||||
#import "MVMCoreUIConstants.h"
|
||||
|
||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||
|
||||
@import MVMCore.MVMCoreDispatchUtility;
|
||||
@import MVMCore.NSDictionary_MFConvenience;
|
||||
@import MVMCore.MVMCoreJSONConstants;
|
||||
@ -115,26 +113,6 @@
|
||||
return textField;
|
||||
}
|
||||
|
||||
- (void)setAsMolecule {
|
||||
self.isMolecule = YES;
|
||||
}
|
||||
|
||||
- (void)setWithJSON:(NSDictionary *)json delegate:(nullable id<UITextFieldDelegate, MFTextFieldDelegate>)delegate additionalData:(NSDictionary *)additionalData {
|
||||
[FormValidator setupValidationWithMolecule:self delegate:(id<FormValidationProtocol>)delegate];
|
||||
FormValidator *formValidator = [FormValidator getFormValidatorForDelegate:(id<FormValidationProtocol>)delegate];
|
||||
[self setWithMap:json bothDelegates:formValidator];
|
||||
}
|
||||
|
||||
- (void)setHorizontalPadding:(CGFloat) padding {
|
||||
self.textContainerLeftPin.constant = padding;
|
||||
self.errorLableLeftPin.constant = padding;
|
||||
self.formLabelLeftPin.constant = padding;
|
||||
|
||||
self.textContainerRightPin.constant = padding;
|
||||
self.errorLableRightPin.constant = padding;
|
||||
self.formLabelRightPin.constant = padding;
|
||||
}
|
||||
|
||||
+ (nullable instancetype)mfTextFieldWithMap:(nullable NSDictionary *)map bothDelegates:(nullable id<UITextFieldDelegate, MFTextFieldDelegate>)delegate {
|
||||
MFTextField *textField = [self mfTextField];
|
||||
textField.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
@ -390,6 +368,16 @@
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setHorizontalPadding:(CGFloat)padding {
|
||||
self.textContainerLeftPin.constant = padding;
|
||||
self.errorLableLeftPin.constant = padding;
|
||||
self.formLabelLeftPin.constant = padding;
|
||||
|
||||
self.textContainerRightPin.constant = padding;
|
||||
self.errorLableRightPin.constant = padding;
|
||||
self.formLabelRightPin.constant = padding;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self setBothTextFieldDelegates:nil];
|
||||
}
|
||||
@ -566,6 +554,19 @@
|
||||
|
||||
#pragma mark - MVMCoreUIMoleculeViewProtocol
|
||||
|
||||
- (void)setAsMolecule {
|
||||
self.isMolecule = YES;
|
||||
}
|
||||
|
||||
- (void)setWithJSON:(NSDictionary *)json delegate:(nullable id<UITextFieldDelegate, MFTextFieldDelegate>)delegate additionalData:(NSDictionary *)additionalData {
|
||||
[FormValidator setupValidationWithMolecule:self delegate:(id<FormValidationProtocol>)delegate];
|
||||
FormValidator *formValidator = [FormValidator getFormValidatorForDelegate:(id<FormValidationProtocol>)delegate];
|
||||
[self setWithMap:json bothDelegates:formValidator];
|
||||
}
|
||||
|
||||
#pragma mark - FormValidationProtocol
|
||||
|
||||
|
||||
- (BOOL)isValidField {
|
||||
return self.valid;
|
||||
}
|
||||
@ -573,6 +574,7 @@
|
||||
- (nullable NSString *)formFieldName {
|
||||
return self.fieldKey;
|
||||
}
|
||||
|
||||
- (nullable id)formFieldValue {
|
||||
return self.text;
|
||||
}
|
||||
|
||||
@ -37,8 +37,6 @@
|
||||
#import "MVMCoreUITabBarPageControlViewController.h"
|
||||
#import "MVMCoreUINavigationController.h"
|
||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||
|
||||
|
||||
@import MVMAnimationFramework;
|
||||
|
||||
@interface MFViewController() <FormValidationProtocol>
|
||||
@ -411,11 +409,9 @@
|
||||
[self initialLoad];
|
||||
}
|
||||
|
||||
// Since we have new data, build stuff for the screen.
|
||||
// Since we have new data, build stuff for the screen and update the ui once the screen is done laying out.
|
||||
[self updateUI];
|
||||
|
||||
// Update the UI after the view is loaded.
|
||||
self.needToUpdateUI = YES;
|
||||
self.needToupdateUIOnScreenSizeChanges = YES;
|
||||
|
||||
if (UIAccessibilityIsVoiceOverRunning()) {
|
||||
@ -427,9 +423,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void) updateUI {
|
||||
- (void)updateUI {
|
||||
[self newDataBuildScreen];
|
||||
[self.formValidator enableByValidation];
|
||||
self.needToUpdateUI = YES;
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user