Changes for new feed template
This commit is contained in:
parent
b3138e7508
commit
3ee784ccb0
@ -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
|
||||
|
||||
|
||||
@ -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];
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user