feedback
This commit is contained in:
parent
d94543f312
commit
770731a639
@ -36,16 +36,10 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol {
|
|||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
@objc public convenience init(asPrimaryButton tiny: Bool) {
|
@objc public convenience init(asPrimaryButton isPrimary: Bool, makeTiny istiny: Bool) {
|
||||||
self.init()
|
self.init()
|
||||||
buttonSize = tiny ? .tiny : .standard
|
buttonSize = istiny ? .tiny : .standard
|
||||||
stylePrimary()
|
isPrimary ? stylePrimary() : styleSecondary()
|
||||||
}
|
|
||||||
|
|
||||||
@objc public convenience init(asSecondaryButton tiny: Bool) {
|
|
||||||
self.init()
|
|
||||||
buttonSize = tiny ? .tiny : .standard
|
|
||||||
styleSecondary()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -188,7 +188,7 @@
|
|||||||
self.labelRightConstraint.active = NO;
|
self.labelRightConstraint.active = NO;
|
||||||
|
|
||||||
// Sets up to use a button action. Always uses the top view controller
|
// Sets up to use a button action. Always uses the top view controller
|
||||||
PillButton *button = [[PillButton alloc] initAsSecondaryButton:true];
|
PillButton *button = [[PillButton alloc] initAsPrimaryButton:false makeTiny:true];
|
||||||
[button styleSecondary];
|
[button styleSecondary];
|
||||||
[button setContentCompressionResistancePriority:UILayoutPriorityDefaultHigh forAxis:UILayoutConstraintAxisHorizontal];
|
[button setContentCompressionResistancePriority:UILayoutPriorityDefaultHigh forAxis:UILayoutConstraintAxisHorizontal];
|
||||||
[button setContentHuggingPriority:800 forAxis:UILayoutConstraintAxisHorizontal];
|
[button setContentHuggingPriority:800 forAxis:UILayoutConstraintAxisHorizontal];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user