small code updates
This commit is contained in:
parent
11e549bc50
commit
f9cecb9a5d
@ -98,7 +98,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setupWithTwoButtons() {
|
func setupWithTwoButtons() {
|
||||||
guard self.viewForButtons == nil else {
|
guard viewForButtons == nil else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let viewForButtons = MVMCoreUICommonViewsUtility.commonView()
|
let viewForButtons = MVMCoreUICommonViewsUtility.commonView()
|
||||||
@ -114,8 +114,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
open func setupWithPrimaryButton() {
|
open func setupWithPrimaryButton() {
|
||||||
// should not allow primaryButton addition, if secondaryButton exists
|
guard primaryButton == nil && secondaryButton == nil else {
|
||||||
guard (self.primaryButton == nil && self.secondaryButton == nil) else {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
createPrimaryButton()
|
createPrimaryButton()
|
||||||
@ -127,8 +126,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
open func setupWithSecondaryButton() {
|
open func setupWithSecondaryButton() {
|
||||||
// should not allow secondaryButton addition, if primaryButton exists
|
guard secondaryButton == nil && primaryButton == nil else {
|
||||||
guard (self.secondaryButton == nil && self.primaryButton == nil) else {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
createSecondaryButton()
|
createSecondaryButton()
|
||||||
@ -154,8 +152,10 @@ import UIKit
|
|||||||
}
|
}
|
||||||
} else if secondaryButtonMap != nil {
|
} else if secondaryButtonMap != nil {
|
||||||
heightConstraint?.isActive = false
|
heightConstraint?.isActive = false
|
||||||
removeButtons()
|
if secondaryButton == nil || primaryButton != nil {
|
||||||
setupWithSecondaryButton()
|
removeButtons()
|
||||||
|
setupWithSecondaryButton()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
removeButtons()
|
removeButtons()
|
||||||
if heightConstraint == nil {
|
if heightConstraint == nil {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user