diff --git a/WordPressAuthenticator.podspec b/WordPressAuthenticator.podspec index a7e762104..f88f34d3d 100644 --- a/WordPressAuthenticator.podspec +++ b/WordPressAuthenticator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressAuthenticator" - s.version = "1.10.0-beta.3" + s.version = "1.10.0-beta.4" s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps." s.description = <<-DESC diff --git a/WordPressAuthenticator/NUX/NUXButton.swift b/WordPressAuthenticator/NUX/NUXButton.swift index 538ba3d01..8a0d52927 100644 --- a/WordPressAuthenticator/NUX/NUXButton.swift +++ b/WordPressAuthenticator/NUX/NUXButton.swift @@ -8,8 +8,21 @@ import WordPressUI return activityIndicator.isAnimating } + open override var isEnabled: Bool { + didSet { + if #available(iOS 13, *) { + activityIndicator.color = isEnabled ? style.primaryTitleColor : style.secondaryTitleColor + } + } + } + @objc let activityIndicator: UIActivityIndicatorView = { - let indicator = UIActivityIndicatorView(style: .white) + let indicator: UIActivityIndicatorView + if #available(iOS 13, *) { + indicator = UIActivityIndicatorView(style: .medium) + } else { + indicator = UIActivityIndicatorView(style: .white) + } indicator.color = WordPressAuthenticator.shared.style.primaryTitleColor indicator.hidesWhenStopped = true return indicator @@ -69,7 +82,10 @@ import WordPressUI open override func awakeFromNib() { super.awakeFromNib() configureAppearance() - activityIndicator.style = .gray + guard #available(iOS 13, *) else { + activityIndicator.style = .gray + return + } } /// Setup: shorter reference for style