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