fix: primary action button appearance issue intro in af42540
This commit is contained in:
parent
b593938767
commit
da9af9a076
|
@ -36,6 +36,7 @@ final class WelcomeViewController: UIViewController, NeedsDependency {
|
|||
|
||||
private(set) lazy var signUpButton: PrimaryActionButton = {
|
||||
let button = PrimaryActionButton()
|
||||
button.adjustsBackgroundImageWhenUserInterfaceStyleChanges = false
|
||||
button.setTitle(L10n.Common.Controls.Actions.signUp, for: .normal)
|
||||
let backgroundImageColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? .white : Asset.Colors.brandBlue.color
|
||||
let backgroundImageHighlightedColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? UIColor(white: 0.8, alpha: 1.0) : Asset.Colors.brandBlueDarken20.color
|
||||
|
|
|
@ -20,6 +20,8 @@ class PrimaryActionButton: UIButton {
|
|||
}()
|
||||
|
||||
private var originalButtonTitle: String?
|
||||
|
||||
var adjustsBackgroundImageWhenUserInterfaceStyleChanges = true
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
|
@ -51,7 +53,9 @@ extension PrimaryActionButton {
|
|||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
super.traitCollectionDidChange(previousTraitCollection)
|
||||
|
||||
setupBackgroundAppearance()
|
||||
if adjustsBackgroundImageWhenUserInterfaceStyleChanges {
|
||||
setupBackgroundAppearance()
|
||||
}
|
||||
}
|
||||
|
||||
func showLoading() {
|
||||
|
|
Loading…
Reference in New Issue