Merge branch 'feature/feed_two_button' into 'develop'

Changes for new feed template

See merge request BPHV_MIPS/mvm_core_ui!26
This commit is contained in:
Pfeil, Scott Robert 2019-04-10 15:46:25 -04:00
commit 75093ca764
3 changed files with 15 additions and 7 deletions

View File

@ -62,8 +62,8 @@ static CGFloat const PrimaryButtonSmallHeight = 30.0;
+ (nullable instancetype)primaryGraySmallRedButton;
+ (nullable instancetype)primaryWhiteSmallRedButton;
// Returns the current height of the button.
- (CGFloat)getHeight;
#pragma mark - For Subclassing

View File

@ -86,6 +86,10 @@
#pragma mark - Sizing
- (CGFloat)getHeight {
return self.height.constant;
}
- (MFSizeObject *)innerPadding {
return [MFSizeObject sizeObjectWithStandardSize:24.0 standardiPadPortraitSize:32.0 iPadProLandscapeSize:36.0];
}

View File

@ -41,11 +41,7 @@ import UIKit
}
let primaryButtonMap = json?.optionalDictionaryForKey("primaryButton")
let secondaryButtonMap = json?.optionalDictionaryForKey("secondaryButton")
setupUI(withPrimaryButtonMap: primaryButtonMap, secondaryButtonMap: secondaryButtonMap, legacy: false)
primaryButton?.setAsStandardCustom()
secondaryButton?.setAsSecondaryCustom()
primaryButton?.setWithJSON(primaryButtonMap, delegate: delegate, additionalData: additionalData)
secondaryButton?.setWithJSON(secondaryButtonMap, delegate: delegate, additionalData: additionalData)
set(primaryButtonJSON: primaryButtonMap, secondaryButtonJSON: secondaryButtonMap, actionDelegate: delegate, additionalData: additionalData, buttonDelegate: delegate)
}
// MARK: - Constraining
@ -141,6 +137,14 @@ import UIKit
}
}
open func set(primaryButtonJSON: [AnyHashable: Any]?, secondaryButtonJSON: [AnyHashable: Any]?, actionDelegate: NSObjectProtocol?, additionalData: [AnyHashable: Any]?, buttonDelegate: Any?) {
setupUI(withPrimaryButtonMap: primaryButtonJSON, secondaryButtonMap: secondaryButtonJSON, legacy: false)
primaryButton?.setAsStandardCustom()
secondaryButton?.setAsSecondaryCustom()
primaryButton?.setWithJSON(primaryButtonJSON, delegate: actionDelegate as? NSObject, additionalData: additionalData)
secondaryButton?.setWithJSON(secondaryButtonJSON, delegate: actionDelegate as? NSObject, additionalData: additionalData)
}
// MARK: - Legacy
open func setup(withButtonMap buttonMap: [AnyHashable: Any]?, actionDelegate: NSObjectProtocol?, additionalData: [AnyHashable: Any]?, buttonDelegate: Any?) {
let secondaryButtonMap = buttonMap?.optionalDictionaryForKey(KeySecondaryButton)