small formatting fixes
This commit is contained in:
parent
63f02a0c7c
commit
df67ded57b
@ -13,8 +13,6 @@
|
|||||||
#import "MFStyler.h"
|
#import "MFStyler.h"
|
||||||
#import "UIColor+MFConvenience.h"
|
#import "UIColor+MFConvenience.h"
|
||||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||||
|
|
||||||
|
|
||||||
@import MVMCore.MVMCoreDispatchUtility;
|
@import MVMCore.MVMCoreDispatchUtility;
|
||||||
@import MVMCore.MVMCoreGetterUtility;
|
@import MVMCore.MVMCoreGetterUtility;
|
||||||
@import MVMCore.NSDictionary_MFConvenience;
|
@import MVMCore.NSDictionary_MFConvenience;
|
||||||
|
|||||||
@ -127,6 +127,7 @@
|
|||||||
|
|
||||||
- (void)setAccessibilityString:(nullable NSString *)accessibilityString;
|
- (void)setAccessibilityString:(nullable NSString *)accessibilityString;
|
||||||
|
|
||||||
|
// For Validator Protocol
|
||||||
- (nullable NSString *)formFieldName;
|
- (nullable NSString *)formFieldName;
|
||||||
- (nullable id)formFieldValue;
|
- (nullable id)formFieldValue;
|
||||||
|
|
||||||
|
|||||||
@ -15,9 +15,7 @@
|
|||||||
#import "MFLabel.h"
|
#import "MFLabel.h"
|
||||||
#import "MVMCoreUIUtility.h"
|
#import "MVMCoreUIUtility.h"
|
||||||
#import "MVMCoreUIConstants.h"
|
#import "MVMCoreUIConstants.h"
|
||||||
|
|
||||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||||
|
|
||||||
@import MVMCore.MVMCoreDispatchUtility;
|
@import MVMCore.MVMCoreDispatchUtility;
|
||||||
@import MVMCore.NSDictionary_MFConvenience;
|
@import MVMCore.NSDictionary_MFConvenience;
|
||||||
@import MVMCore.MVMCoreJSONConstants;
|
@import MVMCore.MVMCoreJSONConstants;
|
||||||
@ -115,26 +113,6 @@
|
|||||||
return textField;
|
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 {
|
+ (nullable instancetype)mfTextFieldWithMap:(nullable NSDictionary *)map bothDelegates:(nullable id<UITextFieldDelegate, MFTextFieldDelegate>)delegate {
|
||||||
MFTextField *textField = [self mfTextField];
|
MFTextField *textField = [self mfTextField];
|
||||||
textField.translatesAutoresizingMaskIntoConstraints = NO;
|
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 {
|
- (void)dealloc {
|
||||||
[self setBothTextFieldDelegates:nil];
|
[self setBothTextFieldDelegates:nil];
|
||||||
}
|
}
|
||||||
@ -566,6 +554,19 @@
|
|||||||
|
|
||||||
#pragma mark - MVMCoreUIMoleculeViewProtocol
|
#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 {
|
- (BOOL)isValidField {
|
||||||
return self.valid;
|
return self.valid;
|
||||||
}
|
}
|
||||||
@ -573,6 +574,7 @@
|
|||||||
- (nullable NSString *)formFieldName {
|
- (nullable NSString *)formFieldName {
|
||||||
return self.fieldKey;
|
return self.fieldKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (nullable id)formFieldValue {
|
- (nullable id)formFieldValue {
|
||||||
return self.text;
|
return self.text;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,8 +37,6 @@
|
|||||||
#import "MVMCoreUITabBarPageControlViewController.h"
|
#import "MVMCoreUITabBarPageControlViewController.h"
|
||||||
#import "MVMCoreUINavigationController.h"
|
#import "MVMCoreUINavigationController.h"
|
||||||
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
#import <MVMCoreUI/MVMCoreUI-Swift.h>
|
||||||
|
|
||||||
|
|
||||||
@import MVMAnimationFramework;
|
@import MVMAnimationFramework;
|
||||||
|
|
||||||
@interface MFViewController() <FormValidationProtocol>
|
@interface MFViewController() <FormValidationProtocol>
|
||||||
@ -411,11 +409,9 @@
|
|||||||
[self initialLoad];
|
[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];
|
[self updateUI];
|
||||||
|
|
||||||
// Update the UI after the view is loaded.
|
|
||||||
self.needToUpdateUI = YES;
|
|
||||||
self.needToupdateUIOnScreenSizeChanges = YES;
|
self.needToupdateUIOnScreenSizeChanges = YES;
|
||||||
|
|
||||||
if (UIAccessibilityIsVoiceOverRunning()) {
|
if (UIAccessibilityIsVoiceOverRunning()) {
|
||||||
@ -427,9 +423,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) updateUI {
|
- (void)updateUI {
|
||||||
[self newDataBuildScreen];
|
[self newDataBuildScreen];
|
||||||
[self.formValidator enableByValidation];
|
[self.formValidator enableByValidation];
|
||||||
|
self.needToUpdateUI = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)didReceiveMemoryWarning {
|
- (void)didReceiveMemoryWarning {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user