Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 38c31e1

Browse files
authored
Merge pull request #619 from wordpress-mobile/feature/nuxbuttoncontroller-button-states
Allow setting the loading / enabled states of NUXButtonViewController button
2 parents 824a323 + 09c8e9c commit 38c31e1

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

WordPressAuthenticator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Pod::Spec.new do |s|
44
s.name = 'WordPressAuthenticator'
5-
s.version = '1.42.0'
5+
s.version = '1.42.1-beta.1'
66

77
s.summary = 'WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps.'
88
s.description = <<-DESC

WordPressAuthenticator/NUX/NUXButtonViewController.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,21 @@ open class NUXButtonViewController: UIViewController {
177177
shadowView?.isHidden = true
178178
}
179179

180+
public func setTopButtonState(isLoading: Bool, isEnabled: Bool) {
181+
topButton?.showActivityIndicator(isLoading)
182+
topButton?.isEnabled = isEnabled
183+
}
184+
185+
public func setBottomButtonState(isLoading: Bool, isEnabled: Bool) {
186+
bottomButton?.showActivityIndicator(isLoading)
187+
bottomButton?.isEnabled = isEnabled
188+
}
189+
190+
public func setTertiaryButtonState(isLoading: Bool, isEnabled: Bool) {
191+
tertiaryButton?.showActivityIndicator(isLoading)
192+
tertiaryButton?.isEnabled = isEnabled
193+
}
194+
180195
// MARK: - Helpers
181196

182197
private func buttonConfigFor(socialService: SocialServiceName, onTap callback: @escaping CallBackType) -> NUXButtonConfig {

0 commit comments

Comments
 (0)