From 00440f737f613a3b864aaffe88d3f666b78b758f Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Mon, 2 Jul 2018 16:31:30 -0500 Subject: [PATCH 01/28] Reference updated `WordPressUI` git branch for UIImage+Asset extension --- Podfile | 2 +- Podfile.lock | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Podfile b/Podfile index aed7bbe93..aa51ba428 100644 --- a/Podfile +++ b/Podfile @@ -16,7 +16,7 @@ target 'WordPressAuthenticator' do ## ==================== ## pod 'Gridicons', '~> 0.15' - pod 'WordPressUI', '~> 1.0' + pod 'WordPressUI', :git => 'https://github.com/wordpress-mobile/WordPressUI-iOS.git', :branch => 'feature/extension-render-bg-image' pod 'WordPressKit', '~> 1.0' pod 'WordPressShared', '~> 1.0' pod 'wpxmlrpc', '~> 0.8' diff --git a/Podfile.lock b/Podfile.lock index 1d890919d..ff0973587 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -71,7 +71,7 @@ PODS: - WordPressShared (1.0.3): - CocoaLumberjack (~> 3.4) - FormatterKit/TimeIntervalFormatter (= 1.8.2) - - WordPressUI (1.0.2) + - WordPressUI (1.0.4) - wpxmlrpc (0.8.3) DEPENDENCIES: @@ -91,7 +91,7 @@ DEPENDENCIES: - UIDeviceIdentifier (~> 0.4) - WordPressKit (~> 1.0) - WordPressShared (~> 1.0) - - WordPressUI (~> 1.0) + - WordPressUI (from `https://github.com/wordpress-mobile/WordPressUI-iOS.git`, branch `feature/extension-render-bg-image`) - wpxmlrpc (~> 0.8) SPEC REPOS: @@ -115,9 +115,18 @@ SPEC REPOS: - UIDeviceIdentifier - WordPressKit - WordPressShared - - WordPressUI - wpxmlrpc +EXTERNAL SOURCES: + WordPressUI: + :branch: feature/extension-render-bg-image + :git: https://github.com/wordpress-mobile/WordPressUI-iOS.git + +CHECKOUT OPTIONS: + WordPressUI: + :commit: ebd678834f02d3d121d9273d5b9547c0b16c9904 + :git: https://github.com/wordpress-mobile/WordPressUI-iOS.git + SPEC CHECKSUMS: 1PasswordExtension: 0e95bdea64ec8ff2f4f693be5467a09fac42a83d AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057 @@ -138,9 +147,9 @@ SPEC CHECKSUMS: UIDeviceIdentifier: a959a6d4f51036b4180dd31fb26483a820f1cc46 WordPressKit: afe6d2c23db6d4f110638c25e86b029e899ffc34 WordPressShared: b8e910d8133a54e9452ab7bd9d8e27e78dc2f5ba - WordPressUI: 70bceaff582bdd6fd8f3ed67aaa200e72fce245d + WordPressUI: f2348649b63b5a9392a72b1d2f46dd1d72e80ad9 wpxmlrpc: bfc572f62ce7ee897f6f38b098d2ba08732ecef4 -PODFILE CHECKSUM: adec9882e25404ab01a7a461fcdd3ddd937d5ba6 +PODFILE CHECKSUM: 1c73d53a28e80bbc3df964082230e60ff4ae016b -COCOAPODS: 1.5.2 +COCOAPODS: 1.5.3 From d19def402945c701d725e2b64c66834894652f2d Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Mon, 2 Jul 2018 16:34:17 -0500 Subject: [PATCH 02/28] Initial changes to make `NUXSubmitButton` conform to UIAppearance changes like `FancyButton` does --- .../NUX/NUXSubmitButton.swift | 285 +++++++++++++----- 1 file changed, 212 insertions(+), 73 deletions(-) diff --git a/WordPressAuthenticator/NUX/NUXSubmitButton.swift b/WordPressAuthenticator/NUX/NUXSubmitButton.swift index b15f9866e..141f8f163 100644 --- a/WordPressAuthenticator/NUX/NUXSubmitButton.swift +++ b/WordPressAuthenticator/NUX/NUXSubmitButton.swift @@ -14,12 +14,6 @@ public protocol ActivityIndicatorButton { /// @objc open class NUXSubmitButton: UIButton, ActivityIndicatorButton { - @IBInspectable open var isPrimary: Bool = false { - didSet { - configureButton() - } - } - @objc let cornerRadius = CGFloat(5.0) @objc var isAnimating: Bool { get { @@ -33,117 +27,255 @@ open class NUXSubmitButton: UIButton, ActivityIndicatorButton { return indicator }() + override open func layoutSubviews() { + super.layoutSubviews() - override open var isEnabled: Bool { - didSet { - configureBorderColor() + if activityIndicator.isAnimating { + titleLabel?.frame = CGRect.zero + + var frm = activityIndicator.frame + frm.origin.x = (frame.width - frm.width) / 2.0 + frm.origin.y = (frame.height - frm.height) / 2.0 + activityIndicator.frame = frm } } + // MARK: - Instance Methods - override open var isHighlighted: Bool { - didSet { - configureBorderColor() + + /// Toggles the visibility of the activity indicator. When visible the button + /// title is hidden. + /// + /// - Parameter show: True to show the spinner. False hides it. + /// + open func showActivityIndicator(_ show: Bool) { + if show { + activityIndicator.startAnimating() + } else { + activityIndicator.stopAnimating() } + configureBackgrounds() + configureTitleColors() + setNeedsLayout() } + func didChangePreferredContentSize() { + titleLabel?.adjustsFontForContentSizeCategory = true + } - // MARK: - LifeCycle Methods - override open func awakeFromNib() { - super.awakeFromNib() - configureButton() + // MARK: UIAppearance Customizations + /// Style: Primary + Normal State + /// + @objc public dynamic var primaryNormalBackgroundColor = Primary.normalBackgroundColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var primaryNormalBorderColor = Primary.normalBorderColor { + didSet { + configureBackgrounds() + } } + /// Style: Primary + Highlighted State + /// + @objc public dynamic var primaryHighlightBackgroundColor = Primary.highlightBackgroundColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var primaryHighlightBorderColor = Primary.highlightBorderColor { + didSet { + configureBackgrounds() + } + } - override open func layoutSubviews() { - super.layoutSubviews() + /// Style: Secondary + /// + @objc public dynamic var secondaryNormalBackgroundColor = Secondary.normalBackgroundColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var secondaryNormalBorderColor = Secondary.normalBorderColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var secondaryHighlightBackgroundColor = Secondary.highlightBackgroundColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var secondaryHighlightBorderColor = Secondary.highlightBorderColor { + didSet { + configureBackgrounds() + } + } - if activityIndicator.isAnimating { - titleLabel?.frame = CGRect.zero + /// Style: Disabled State + /// + @objc public dynamic var disabledBackgroundColor = Disabled.backgroundColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var disabledBorderColor = Disabled.borderColor { + didSet { + configureBackgrounds() + } + } - var frm = activityIndicator.frame - frm.origin.x = (frame.width - frm.width) / 2.0 - frm.origin.y = (frame.height - frm.height) / 2.0 - activityIndicator.frame = frm + /// Style: Title! + /// + @objc public dynamic var titleFont = Title.defaultFont { + didSet { + configureTitleLabel() + } + } + @objc public dynamic var primaryTitleColor = Title.primaryColor { + didSet { + configureTitleColors() + } + } + @objc public dynamic var secondaryTitleColor = Title.secondaryColor { + didSet { + configureTitleColors() + } + } + @objc public dynamic var disabledTitleColor = Title.disabledColor { + didSet { + configureTitleColors() + } + } + + /// Insets to be applied over the Contents. + /// + @objc public dynamic var contentInsets = UIImage.Metrics.contentInsets { + didSet { + configureInsets() } } + /// Indicates if the current instance should be rendered with the "Primary" Style. + /// + @IBInspectable var isPrimary: Bool = false { + didSet { + configureBackgrounds() + configureTitleColors() + } + } - // MARK: - Configuration + // MARK: - LifeCycle Methods - /// Configure the appearance of the configure button. + open override func didMoveToWindow() { + super.didMoveToWindow() + configureAppearance() + } + + open override func awakeFromNib() { + super.awakeFromNib() + configureAppearance() + } + + + /// Setup: Everything = [Insets, Backgrounds, titleColor(s), titleLabel] /// - @objc func configureButton() { - contentEdgeInsets = UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 15) + private func configureAppearance() { + configureInsets() + configureBackgrounds() + configureTitleColors() + configureTitleLabel() + } - layer.cornerRadius = cornerRadius - layer.borderWidth = 1 - layer.borderColor = UIColor.white.cgColor - clipsToBounds = true + /// Setup: FancyButton's Default Settings + /// + private func configureInsets() { + contentEdgeInsets = contentInsets + } - titleLabel?.font = WPFontManager.systemSemiBoldFont(ofSize: 17.0) + /// Setup: BackgroundImage + /// + private func configureBackgrounds() { + let normalImage: UIImage + let highlightedImage: UIImage + let disabledImage = UIImage.renderBackgroundImage(fill: disabledBackgroundColor, border: disabledBorderColor, cornerRadius: Metrics.backgroundCornerRadius) - let capInsets = UIEdgeInsets(top: cornerRadius, left: cornerRadius, bottom: cornerRadius, right: cornerRadius) - var backgroundColor = UIColor.clear - var titleColorNormal = UIColor.white - var titleColorHighlighted = WPStyleGuide.lightBlue() - var titleColorDisabled = UIColor(white: 1.0, alpha: NUXSubmitButtonDisabledAlpha) if isPrimary { - backgroundColor = UIColor.white - titleColorNormal = WPStyleGuide.wordPressBlue() - titleColorHighlighted = WPStyleGuide.darkBlue() - titleColorDisabled = titleColorNormal.withAlphaComponent(NUXSubmitButtonDisabledAlpha) + normalImage = UIImage.renderBackgroundImage(fill: primaryNormalBackgroundColor, border: primaryNormalBorderColor, cornerRadius: Metrics.backgroundCornerRadius) + highlightedImage = UIImage.renderBackgroundImage(fill: primaryHighlightBackgroundColor, border: primaryHighlightBorderColor, cornerRadius: Metrics.backgroundCornerRadius) + } else { + normalImage = UIImage.renderBackgroundImage(fill: secondaryNormalBackgroundColor, border: secondaryNormalBorderColor, cornerRadius: Metrics.backgroundCornerRadius) + highlightedImage = UIImage.renderBackgroundImage(fill: secondaryHighlightBackgroundColor, border: secondaryHighlightBorderColor, cornerRadius: Metrics.backgroundCornerRadius) } - let normalImage = UIImage(color: backgroundColor, havingSize: CGSize(width: 44, height: 44)) - setBackgroundImage(normalImage?.resizableImage(withCapInsets: capInsets), for: .normal) - setBackgroundImage(normalImage?.resizableImage(withCapInsets: capInsets), for: .highlighted) - setTitleColor(titleColorNormal, for: .normal) - setTitleColor(titleColorHighlighted, for: .highlighted) - setTitleColor(titleColorDisabled, for: .disabled) + setBackgroundImage(normalImage, for: .normal) + setBackgroundImage(highlightedImage, for: .highlighted) + setBackgroundImage(disabledImage, for: .disabled) addSubview(activityIndicator) } - - /// Configures the border color. + /// Setup: TitleColor /// - @objc func configureBorderColor() { - var color: UIColor - if isEnabled { - color = isHighlighted ? WPStyleGuide.lightBlue() : UIColor.white - } else { - color = UIColor(white: 1.0, alpha: NUXSubmitButtonDisabledAlpha) - } - layer.borderColor = color.cgColor - } + private func configureTitleColors() { + let titleColorNormal = isPrimary ? primaryTitleColor : secondaryTitleColor + setTitleColor(titleColorNormal, for: .normal) + setTitleColor(titleColorNormal, for: .highlighted) + setTitleColor(disabledTitleColor, for: .disabled) + } - // MARK: - Instance Methods + /// Setup: TitleLabel + /// + private func configureTitleLabel() { + titleLabel?.font = titleFont + titleLabel?.adjustsFontForContentSizeCategory = true + titleLabel?.textAlignment = .center + } +} +// MARK: - Nested types +private extension NUXSubmitButton { + /// Style: Primary + /// + struct Primary { + static let normalBackgroundColor = WPStyleGuide.lightBlue() + static let normalBorderColor = WPStyleGuide.darkBlue() + static let highlightBackgroundColor = WPStyleGuide.darkBlue() + static let highlightBorderColor = normalBorderColor + } - /// Toggles the visibility of the activity indicator. When visible the button - /// title is hidden. + /// Style: Secondary /// - /// - Parameter show: True to show the spinner. False hides it. + struct Secondary { + static let normalBackgroundColor = UIColor.clear + static let normalBorderColor = UIColor.white + static let highlightBackgroundColor = UIColor.white + static let highlightBorderColor = highlightBackgroundColor + } + + /// Style: Disabled /// - open func showActivityIndicator(_ show: Bool) { - if show { - activityIndicator.startAnimating() - } else { - activityIndicator.stopAnimating() - } - configureBorderColor() - setNeedsLayout() + struct Disabled { + static let backgroundColor = UIColor.white + static let borderColor = UIColor(white: 1.0, alpha: NUXSubmitButtonDisabledAlpha) } - func didChangePreferredContentSize() { - titleLabel?.adjustsFontForContentSizeCategory = true + /// Style: Title + /// + struct Title { + static let primaryColor = UIColor.white + static let secondaryColor = WPStyleGuide.darkBlue() + static let disabledColor = UIColor(white: 1.0, alpha: NUXSubmitButtonDisabledAlpha) + static let defaultFont = WPFontManager.systemSemiBoldFont(ofSize: 17.0) } } +// MARK: - +// extension NUXSubmitButton { override open func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) @@ -151,4 +283,11 @@ extension NUXSubmitButton { didChangePreferredContentSize() } } + + struct Metrics { + static let backgroundCornerRadius = CGFloat(5.0) + static let backgroundCapInsets = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5) + static let backgroundShadowOffset = CGSize(width: 1, height: 1) + static var contentInsets = UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 15) + } } From f42902c642e4facdeed32a264296e6e2b69794cc Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 3 Jul 2018 10:09:35 -0500 Subject: [PATCH 03/28] Restore podfile settings --- Podfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile b/Podfile index aa51ba428..aed7bbe93 100644 --- a/Podfile +++ b/Podfile @@ -16,7 +16,7 @@ target 'WordPressAuthenticator' do ## ==================== ## pod 'Gridicons', '~> 0.15' - pod 'WordPressUI', :git => 'https://github.com/wordpress-mobile/WordPressUI-iOS.git', :branch => 'feature/extension-render-bg-image' + pod 'WordPressUI', '~> 1.0' pod 'WordPressKit', '~> 1.0' pod 'WordPressShared', '~> 1.0' pod 'wpxmlrpc', '~> 0.8' From 524ef642f8ff1c8a06d3a4ff5a003b51cecb0039 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 3 Jul 2018 10:32:15 -0500 Subject: [PATCH 04/28] Makes NUXButton configurable using UIAppearance Removes NUXSubmitButton class. Removes button background assets and generates button background images. --- .../project.pbxproj | 4 - WordPressAuthenticator/NUX/NUXButton.swift | 288 +++++++++++++++-- .../NUX/NUXLinkMailViewController.swift | 2 +- .../NUX/NUXSubmitButton.swift | 293 ------------------ .../NUX/NUXViewController.swift | 2 +- .../Contents.json | 65 ---- .../beveled-blue-button-down.png | Bin 775 -> 0 bytes .../beveled-blue-button-down@2x.png | Bin 1163 -> 0 bytes .../beveled-blue-button-down@3x.png | Bin 1565 -> 0 bytes .../Contents.json | 65 ---- .../beveled-blue-button.png | Bin 923 -> 0 bytes .../beveled-blue-button@2x.png | Bin 1500 -> 0 bytes .../beveled-blue-button@3x.png | Bin 2128 -> 0 bytes .../Contents.json | 65 ---- .../beveled-disabled-button.png | Bin 932 -> 0 bytes .../beveled-disabled-button@2x.png | Bin 1533 -> 0 bytes .../beveled-disabled-button@3x.png | Bin 2177 -> 0 bytes .../Contents.json | 65 ---- .../beveled-secondary-button-down.png | Bin 784 -> 0 bytes .../beveled-secondary-button-down@2x.png | Bin 1179 -> 0 bytes .../beveled-secondary-button-down@3x.png | Bin 1585 -> 0 bytes .../Contents.json | 65 ---- .../beveled-secondary-button.png | Bin 973 -> 0 bytes .../beveled-secondary-button@2x.png | Bin 1641 -> 0 bytes .../beveled-secondary-button@3x.png | Bin 2320 -> 0 bytes .../LoginLinkRequestViewController.swift | 2 +- 26 files changed, 263 insertions(+), 653 deletions(-) delete mode 100644 WordPressAuthenticator/NUX/NUXSubmitButton.swift delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/Contents.json delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down@2x.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down@3x.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/Contents.json delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button@2x.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button@3x.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/Contents.json delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button@2x.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button@3x.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/Contents.json delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down@2x.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down@3x.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/Contents.json delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button@2x.png delete mode 100644 WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button@3x.png diff --git a/WordPressAuthenticator.xcodeproj/project.pbxproj b/WordPressAuthenticator.xcodeproj/project.pbxproj index cc7863ac4..4f0726ce5 100644 --- a/WordPressAuthenticator.xcodeproj/project.pbxproj +++ b/WordPressAuthenticator.xcodeproj/project.pbxproj @@ -23,7 +23,6 @@ B56090CB208A4F5400399AE4 /* NUXNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56090BD208A4F5400399AE4 /* NUXNavigationController.swift */; }; B56090CC208A4F5400399AE4 /* NUXTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56090BE208A4F5400399AE4 /* NUXTableViewController.swift */; }; B56090CD208A4F5400399AE4 /* NUXSegueHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56090BF208A4F5400399AE4 /* NUXSegueHandler.swift */; }; - B56090CE208A4F5400399AE4 /* NUXSubmitButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56090C0208A4F5400399AE4 /* NUXSubmitButton.swift */; }; B56090CF208A4F5400399AE4 /* NUXCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56090C1208A4F5400399AE4 /* NUXCollectionViewController.swift */; }; B56090D0208A4F5400399AE4 /* NUXViewControllerBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56090C2208A4F5400399AE4 /* NUXViewControllerBase.swift */; }; B56090D1208A4F5400399AE4 /* NUXViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56090C3208A4F5400399AE4 /* NUXViewController.swift */; }; @@ -151,7 +150,6 @@ B56090BD208A4F5400399AE4 /* NUXNavigationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NUXNavigationController.swift; sourceTree = ""; }; B56090BE208A4F5400399AE4 /* NUXTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NUXTableViewController.swift; sourceTree = ""; }; B56090BF208A4F5400399AE4 /* NUXSegueHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NUXSegueHandler.swift; sourceTree = ""; }; - B56090C0208A4F5400399AE4 /* NUXSubmitButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NUXSubmitButton.swift; sourceTree = ""; }; B56090C1208A4F5400399AE4 /* NUXCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NUXCollectionViewController.swift; sourceTree = ""; }; B56090C2208A4F5400399AE4 /* NUXViewControllerBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NUXViewControllerBase.swift; sourceTree = ""; }; B56090C3208A4F5400399AE4 /* NUXViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NUXViewController.swift; sourceTree = ""; }; @@ -357,7 +355,6 @@ B56090BB208A4F5300399AE4 /* NUXLinkMailViewController.swift */, B56090BD208A4F5400399AE4 /* NUXNavigationController.swift */, B56090BF208A4F5400399AE4 /* NUXSegueHandler.swift */, - B56090C0208A4F5400399AE4 /* NUXSubmitButton.swift */, B56090BE208A4F5400399AE4 /* NUXTableViewController.swift */, B56090C3208A4F5400399AE4 /* NUXViewController.swift */, B56090C2208A4F5400399AE4 /* NUXViewControllerBase.swift */, @@ -844,7 +841,6 @@ B56090E4208A4F9D00399AE4 /* WPNUXMainButton.m in Sources */, B560913B208A563800399AE4 /* LoginSelfHostedViewController.swift in Sources */, B5609136208A563800399AE4 /* Login2FAViewController.swift in Sources */, - B56090CE208A4F5400399AE4 /* NUXSubmitButton.swift in Sources */, B56090E1208A4F9D00399AE4 /* WPWalkthroughTextField.m in Sources */, B56090EF208A527000399AE4 /* WPStyleGuide+Login.swift in Sources */, B56090D0208A4F5400399AE4 /* NUXViewControllerBase.swift in Sources */, diff --git a/WordPressAuthenticator/NUX/NUXButton.swift b/WordPressAuthenticator/NUX/NUXButton.swift index 5cce173dc..44765fcaa 100644 --- a/WordPressAuthenticator/NUX/NUXButton.swift +++ b/WordPressAuthenticator/NUX/NUXButton.swift @@ -1,54 +1,286 @@ import UIKit import WordPressShared +import WordPressUI + +/// A protocol for an element that can display a UIActivityIndicatorView +@objc +public protocol ActivityIndicatorButton { + func showActivityIndicator(_ show: Bool) +} /// A stylized button used by Login controllers. It also can display a `UIActivityIndicatorView`. -@objc open class NUXButton: NUXSubmitButton { - // MARK: - Configuration - fileprivate let horizontalInset: CGFloat = 20 - fileprivate let verticalInset: CGFloat = 12 - fileprivate let maxFontSize: CGFloat = 22 +@objc open class NUXButton: UIButton, ActivityIndicatorButton { + @objc var isAnimating: Bool { + get { + return activityIndicator.isAnimating + } + } + + @objc let activityIndicator: UIActivityIndicatorView = { + let indicator = UIActivityIndicatorView(activityIndicatorStyle: .white) + indicator.hidesWhenStopped = true + return indicator + }() + + override open func layoutSubviews() { + super.layoutSubviews() + + if activityIndicator.isAnimating { + titleLabel?.frame = CGRect.zero - /// Configure the appearance of the button. + var frm = activityIndicator.frame + frm.origin.x = (frame.width - frm.width) / 2.0 + frm.origin.y = (frame.height - frm.height) / 2.0 + activityIndicator.frame = frm + } + } + + // MARK: - Instance Methods + + + /// Toggles the visibility of the activity indicator. When visible the button + /// title is hidden. + /// + /// - Parameter show: True to show the spinner. False hides it. /// - override open func configureButton() { - contentEdgeInsets = UIEdgeInsets(top: verticalInset, left: horizontalInset, bottom: verticalInset, right: horizontalInset) + open func showActivityIndicator(_ show: Bool) { + if show { + activityIndicator.startAnimating() + } else { + activityIndicator.stopAnimating() + } + configureBackgrounds() + configureTitleColors() + setNeedsLayout() + } - titleLabel?.font = WPStyleGuide.fontForTextStyle(.headline, maximumPointSize: maxFontSize) + func didChangePreferredContentSize() { titleLabel?.adjustsFontForContentSizeCategory = true - titleLabel?.textAlignment = .center + } - let normalImage: UIImage - let highlightImage: UIImage - let titleColorNormal: UIColor - if isPrimary { - normalImage = .beveledBlueButtonImage - highlightImage = .belevedBlueButtonDownImage + // MARK: UIAppearance Customizations + /// Style: Primary + Normal State + /// + @objc public dynamic var primaryNormalBackgroundColor = Primary.normalBackgroundColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var primaryNormalBorderColor = Primary.normalBorderColor { + didSet { + configureBackgrounds() + } + } - titleColorNormal = UIColor.white - } else { - normalImage = .beveledSecondaryButtonImage - highlightImage = .beveledSecondaryButtonDownImage + /// Style: Primary + Highlighted State + /// + @objc public dynamic var primaryHighlightBackgroundColor = Primary.highlightBackgroundColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var primaryHighlightBorderColor = Primary.highlightBorderColor { + didSet { + configureBackgrounds() + } + } + + /// Style: Secondary + /// + @objc public dynamic var secondaryNormalBackgroundColor = Secondary.normalBackgroundColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var secondaryNormalBorderColor = Secondary.normalBorderColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var secondaryHighlightBackgroundColor = Secondary.highlightBackgroundColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var secondaryHighlightBorderColor = Secondary.highlightBorderColor { + didSet { + configureBackgrounds() + } + } + + /// Style: Disabled State + /// + @objc public dynamic var disabledBackgroundColor = Disabled.backgroundColor { + didSet { + configureBackgrounds() + } + } + @objc public dynamic var disabledBorderColor = Disabled.borderColor { + didSet { + configureBackgrounds() + } + } + + /// Style: Title! + /// + @objc public dynamic var titleFont = Title.defaultFont { + didSet { + configureTitleLabel() + } + } + @objc public dynamic var primaryTitleColor = Title.primaryColor { + didSet { + configureTitleColors() + } + } + @objc public dynamic var secondaryTitleColor = Title.secondaryColor { + didSet { + configureTitleColors() + } + } + @objc public dynamic var disabledTitleColor = Title.disabledColor { + didSet { + configureTitleColors() + } + } - titleColorNormal = WPStyleGuide.darkGrey() + /// Insets to be applied over the Contents. + /// + @objc public dynamic var contentInsets = UIImage.Metrics.contentInsets { + didSet { + configureInsets() + } + } + + /// Indicates if the current instance should be rendered with the "Primary" Style. + /// + @IBInspectable var isPrimary: Bool = false { + didSet { + configureBackgrounds() + configureTitleColors() } + } + + + // MARK: - LifeCycle Methods + + open override func didMoveToWindow() { + super.didMoveToWindow() + configureAppearance() + } + + open override func awakeFromNib() { + super.awakeFromNib() + configureAppearance() + } - let disabledImage = UIImage.beveledDisabledButtonImage - let titleColorDisabled = WPStyleGuide.greyLighten30() + + /// Setup: Everything = [Insets, Backgrounds, titleColor(s), titleLabel] + /// + private func configureAppearance() { + configureInsets() + configureBackgrounds() + configureTitleColors() + configureTitleLabel() + } + + /// Setup: FancyButton's Default Settings + /// + private func configureInsets() { + contentEdgeInsets = contentInsets + } + + /// Setup: BackgroundImage + /// + private func configureBackgrounds() { + let normalImage: UIImage + let highlightedImage: UIImage + let disabledImage = UIImage.renderBackgroundImage(fill: disabledBackgroundColor, border: disabledBorderColor, shadowOffset: Metrics.backgroundShadowOffset) + + if isPrimary { + normalImage = UIImage.renderBackgroundImage(fill: primaryNormalBackgroundColor, border: primaryNormalBorderColor, shadowOffset: Metrics.backgroundShadowOffset) + highlightedImage = UIImage.renderBackgroundImage(fill: primaryHighlightBackgroundColor, border: primaryHighlightBorderColor, shadowOffset: Metrics.backgroundShadowOffset) + } else { + normalImage = UIImage.renderBackgroundImage(fill: secondaryNormalBackgroundColor, border: secondaryNormalBorderColor, shadowOffset: Metrics.backgroundShadowOffset) + highlightedImage = UIImage.renderBackgroundImage(fill: secondaryHighlightBackgroundColor, border: secondaryHighlightBorderColor, shadowOffset: Metrics.backgroundShadowOffset) + } setBackgroundImage(normalImage, for: .normal) - setBackgroundImage(highlightImage, for: .highlighted) + setBackgroundImage(highlightedImage, for: .highlighted) setBackgroundImage(disabledImage, for: .disabled) + activityIndicator.activityIndicatorViewStyle = .gray + addSubview(activityIndicator) + } + + /// Setup: TitleColor + /// + private func configureTitleColors() { + let titleColorNormal = isPrimary ? primaryTitleColor : secondaryTitleColor + setTitleColor(titleColorNormal, for: .normal) setTitleColor(titleColorNormal, for: .highlighted) - setTitleColor(titleColorDisabled, for: .disabled) + setTitleColor(disabledTitleColor, for: .disabled) + } - activityIndicator.activityIndicatorViewStyle = .gray + /// Setup: TitleLabel + /// + private func configureTitleLabel() { + titleLabel?.font = titleFont + titleLabel?.adjustsFontForContentSizeCategory = true + titleLabel?.textAlignment = .center + } +} - addSubview(activityIndicator) +// MARK: - Nested types +private extension NUXButton { + /// Style: Primary + /// + struct Primary { + static let normalBackgroundColor = WPStyleGuide.mediumBlue() + static let normalBorderColor = WPStyleGuide.wordPressBlue() + static let highlightBackgroundColor = WPStyleGuide.wordPressBlue() + static let highlightBorderColor = normalBorderColor + } + + /// Style: Secondary + /// + struct Secondary { + static let normalBackgroundColor = UIColor.white + static let normalBorderColor = WPStyleGuide.greyLighten20() + static let highlightBackgroundColor = WPStyleGuide.greyLighten20() + static let highlightBorderColor = highlightBackgroundColor + } + + /// Style: Disabled + /// + struct Disabled { + static let backgroundColor = UIColor.white + static let borderColor = WPStyleGuide.greyLighten30() + } + + /// Style: Title + /// + struct Title { + static let primaryColor = UIColor.white + static let secondaryColor = WPStyleGuide.darkGrey() + static let disabledColor = WPStyleGuide.greyLighten30() + static let defaultFont = WPFontManager.systemSemiBoldFont(ofSize: 17.0) + } +} + +// MARK: - +// +extension NUXButton { + override open func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + if previousTraitCollection?.preferredContentSizeCategory != traitCollection.preferredContentSizeCategory { + didChangePreferredContentSize() + } } - override open func configureBorderColor() { + struct Metrics { + static let backgroundShadowOffset = CGSize(width: 0, height: 2) } } diff --git a/WordPressAuthenticator/NUX/NUXLinkMailViewController.swift b/WordPressAuthenticator/NUX/NUXLinkMailViewController.swift index f96b3a07f..526767557 100644 --- a/WordPressAuthenticator/NUX/NUXLinkMailViewController.swift +++ b/WordPressAuthenticator/NUX/NUXLinkMailViewController.swift @@ -8,7 +8,7 @@ import WordPressShared /// class NUXLinkMailViewController: LoginViewController { @IBOutlet var label: UILabel? - @IBOutlet var openMailButton: NUXSubmitButton? + @IBOutlet var openMailButton: NUXButton? @IBOutlet var usePasswordButton: UIButton? var emailMagicLinkSource: EmailMagicLinkSource? override var sourceTag: WordPressSupportSourceTag { diff --git a/WordPressAuthenticator/NUX/NUXSubmitButton.swift b/WordPressAuthenticator/NUX/NUXSubmitButton.swift deleted file mode 100644 index 141f8f163..000000000 --- a/WordPressAuthenticator/NUX/NUXSubmitButton.swift +++ /dev/null @@ -1,293 +0,0 @@ -import UIKit -import WordPressShared - -let NUXSubmitButtonDisabledAlpha = CGFloat(0.25) - -/// A protocol for an element that can display a UIActivityIndicatorView -@objc -public protocol ActivityIndicatorButton { - func showActivityIndicator(_ show: Bool) -} - -/// A stylized button used by NUX controllers. The button presents white text -/// surrounded by a white border. It also can display a `UIActivityIndicatorView`. -/// -@objc -open class NUXSubmitButton: UIButton, ActivityIndicatorButton { - - @objc var isAnimating: Bool { - get { - return activityIndicator.isAnimating - } - } - - @objc let activityIndicator: UIActivityIndicatorView = { - let indicator = UIActivityIndicatorView(activityIndicatorStyle: .white) - indicator.hidesWhenStopped = true - return indicator - }() - - override open func layoutSubviews() { - super.layoutSubviews() - - if activityIndicator.isAnimating { - titleLabel?.frame = CGRect.zero - - var frm = activityIndicator.frame - frm.origin.x = (frame.width - frm.width) / 2.0 - frm.origin.y = (frame.height - frm.height) / 2.0 - activityIndicator.frame = frm - } - } - - // MARK: - Instance Methods - - - /// Toggles the visibility of the activity indicator. When visible the button - /// title is hidden. - /// - /// - Parameter show: True to show the spinner. False hides it. - /// - open func showActivityIndicator(_ show: Bool) { - if show { - activityIndicator.startAnimating() - } else { - activityIndicator.stopAnimating() - } - configureBackgrounds() - configureTitleColors() - setNeedsLayout() - } - - func didChangePreferredContentSize() { - titleLabel?.adjustsFontForContentSizeCategory = true - } - - - // MARK: UIAppearance Customizations - /// Style: Primary + Normal State - /// - @objc public dynamic var primaryNormalBackgroundColor = Primary.normalBackgroundColor { - didSet { - configureBackgrounds() - } - } - @objc public dynamic var primaryNormalBorderColor = Primary.normalBorderColor { - didSet { - configureBackgrounds() - } - } - - /// Style: Primary + Highlighted State - /// - @objc public dynamic var primaryHighlightBackgroundColor = Primary.highlightBackgroundColor { - didSet { - configureBackgrounds() - } - } - @objc public dynamic var primaryHighlightBorderColor = Primary.highlightBorderColor { - didSet { - configureBackgrounds() - } - } - - /// Style: Secondary - /// - @objc public dynamic var secondaryNormalBackgroundColor = Secondary.normalBackgroundColor { - didSet { - configureBackgrounds() - } - } - @objc public dynamic var secondaryNormalBorderColor = Secondary.normalBorderColor { - didSet { - configureBackgrounds() - } - } - @objc public dynamic var secondaryHighlightBackgroundColor = Secondary.highlightBackgroundColor { - didSet { - configureBackgrounds() - } - } - @objc public dynamic var secondaryHighlightBorderColor = Secondary.highlightBorderColor { - didSet { - configureBackgrounds() - } - } - - /// Style: Disabled State - /// - @objc public dynamic var disabledBackgroundColor = Disabled.backgroundColor { - didSet { - configureBackgrounds() - } - } - @objc public dynamic var disabledBorderColor = Disabled.borderColor { - didSet { - configureBackgrounds() - } - } - - /// Style: Title! - /// - @objc public dynamic var titleFont = Title.defaultFont { - didSet { - configureTitleLabel() - } - } - @objc public dynamic var primaryTitleColor = Title.primaryColor { - didSet { - configureTitleColors() - } - } - @objc public dynamic var secondaryTitleColor = Title.secondaryColor { - didSet { - configureTitleColors() - } - } - @objc public dynamic var disabledTitleColor = Title.disabledColor { - didSet { - configureTitleColors() - } - } - - /// Insets to be applied over the Contents. - /// - @objc public dynamic var contentInsets = UIImage.Metrics.contentInsets { - didSet { - configureInsets() - } - } - - /// Indicates if the current instance should be rendered with the "Primary" Style. - /// - @IBInspectable var isPrimary: Bool = false { - didSet { - configureBackgrounds() - configureTitleColors() - } - } - - - // MARK: - LifeCycle Methods - - open override func didMoveToWindow() { - super.didMoveToWindow() - configureAppearance() - } - - open override func awakeFromNib() { - super.awakeFromNib() - configureAppearance() - } - - - /// Setup: Everything = [Insets, Backgrounds, titleColor(s), titleLabel] - /// - private func configureAppearance() { - configureInsets() - configureBackgrounds() - configureTitleColors() - configureTitleLabel() - } - - /// Setup: FancyButton's Default Settings - /// - private func configureInsets() { - contentEdgeInsets = contentInsets - } - - /// Setup: BackgroundImage - /// - private func configureBackgrounds() { - let normalImage: UIImage - let highlightedImage: UIImage - let disabledImage = UIImage.renderBackgroundImage(fill: disabledBackgroundColor, border: disabledBorderColor, cornerRadius: Metrics.backgroundCornerRadius) - - if isPrimary { - normalImage = UIImage.renderBackgroundImage(fill: primaryNormalBackgroundColor, border: primaryNormalBorderColor, cornerRadius: Metrics.backgroundCornerRadius) - highlightedImage = UIImage.renderBackgroundImage(fill: primaryHighlightBackgroundColor, border: primaryHighlightBorderColor, cornerRadius: Metrics.backgroundCornerRadius) - } else { - normalImage = UIImage.renderBackgroundImage(fill: secondaryNormalBackgroundColor, border: secondaryNormalBorderColor, cornerRadius: Metrics.backgroundCornerRadius) - highlightedImage = UIImage.renderBackgroundImage(fill: secondaryHighlightBackgroundColor, border: secondaryHighlightBorderColor, cornerRadius: Metrics.backgroundCornerRadius) - } - - setBackgroundImage(normalImage, for: .normal) - setBackgroundImage(highlightedImage, for: .highlighted) - setBackgroundImage(disabledImage, for: .disabled) - - addSubview(activityIndicator) - } - - /// Setup: TitleColor - /// - private func configureTitleColors() { - let titleColorNormal = isPrimary ? primaryTitleColor : secondaryTitleColor - - setTitleColor(titleColorNormal, for: .normal) - setTitleColor(titleColorNormal, for: .highlighted) - setTitleColor(disabledTitleColor, for: .disabled) - } - - /// Setup: TitleLabel - /// - private func configureTitleLabel() { - titleLabel?.font = titleFont - titleLabel?.adjustsFontForContentSizeCategory = true - titleLabel?.textAlignment = .center - } -} - -// MARK: - Nested types -private extension NUXSubmitButton { - /// Style: Primary - /// - struct Primary { - static let normalBackgroundColor = WPStyleGuide.lightBlue() - static let normalBorderColor = WPStyleGuide.darkBlue() - static let highlightBackgroundColor = WPStyleGuide.darkBlue() - static let highlightBorderColor = normalBorderColor - } - - /// Style: Secondary - /// - struct Secondary { - static let normalBackgroundColor = UIColor.clear - static let normalBorderColor = UIColor.white - static let highlightBackgroundColor = UIColor.white - static let highlightBorderColor = highlightBackgroundColor - } - - /// Style: Disabled - /// - struct Disabled { - static let backgroundColor = UIColor.white - static let borderColor = UIColor(white: 1.0, alpha: NUXSubmitButtonDisabledAlpha) - } - - /// Style: Title - /// - struct Title { - static let primaryColor = UIColor.white - static let secondaryColor = WPStyleGuide.darkBlue() - static let disabledColor = UIColor(white: 1.0, alpha: NUXSubmitButtonDisabledAlpha) - static let defaultFont = WPFontManager.systemSemiBoldFont(ofSize: 17.0) - } -} - -// MARK: - -// -extension NUXSubmitButton { - override open func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { - super.traitCollectionDidChange(previousTraitCollection) - if previousTraitCollection?.preferredContentSizeCategory != traitCollection.preferredContentSizeCategory { - didChangePreferredContentSize() - } - } - - struct Metrics { - static let backgroundCornerRadius = CGFloat(5.0) - static let backgroundCapInsets = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5) - static let backgroundShadowOffset = CGSize(width: 1, height: 1) - static var contentInsets = UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 15) - } -} diff --git a/WordPressAuthenticator/NUX/NUXViewController.swift b/WordPressAuthenticator/NUX/NUXViewController.swift index 61cab2ac9..e4fe29cce 100644 --- a/WordPressAuthenticator/NUX/NUXViewController.swift +++ b/WordPressAuthenticator/NUX/NUXViewController.swift @@ -51,7 +51,7 @@ open class NUXViewController: UIViewController, NUXViewControllerBase, UIViewCon } // properties specific to NUXViewController - @IBOutlet var submitButton: NUXSubmitButton? + @IBOutlet var submitButton: NUXButton? @IBOutlet var errorLabel: UILabel? func configureSubmitButton(animating: Bool) { diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/Contents.json b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/Contents.json deleted file mode 100644 index 2fa60354a..000000000 --- a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/Contents.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "images" : [ - { - "resizing" : { - "mode" : "9-part", - "center" : { - "mode" : "stretch", - "width" : 1, - "height" : 1 - }, - "cap-insets" : { - "bottom" : 20, - "top" : 18, - "right" : 18, - "left" : 18 - } - }, - "idiom" : "universal", - "filename" : "beveled-blue-button-down.png", - "scale" : "1x" - }, - { - "resizing" : { - "mode" : "9-part", - "center" : { - "mode" : "stretch", - "width" : 1, - "height" : 1 - }, - "cap-insets" : { - "bottom" : 20, - "top" : 18, - "right" : 18, - "left" : 18 - } - }, - "idiom" : "universal", - "filename" : "beveled-blue-button-down@2x.png", - "scale" : "2x" - }, - { - "resizing" : { - "mode" : "9-part", - "center" : { - "mode" : "stretch", - "width" : 1, - "height" : 1 - }, - "cap-insets" : { - "bottom" : 30, - "top" : 24, - "right" : 24, - "left" : 24 - } - }, - "idiom" : "universal", - "filename" : "beveled-blue-button-down@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down.png deleted file mode 100644 index 7aff33a296a68caa11da4ae1fbe386ea8da560d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 775 zcmeAS@N?(olHy`uVBq!ia0vp^HbAVw!3HE3?VkCcfq}6p)7d$oILO^e!PC{*%+S)z zOxH-y5U6Nk>BQ6CPL3k&_NFgWBSfw&YHiuNNrQQ%?*t(+j}FN%w_coefAF|yz2HT& z3~dpY+$!By`YUoTSaEbIbu5T|y~s>-d$Fm3()ogCHJ@i&w$C(9=uMllChju-%^1gS zmcQ#}-n0yVD_r&}bD^xa&&8`33oKkhtM?yGI`%qlbJ*A7|51;VoWc(TsoN}C5#?AB zW3eSD!1ta|Uht)jt`CJ1`_;rn_8ESym^t6qZ|cv>DY{ae4O=5`O#OBAWBi&WTi0yZ zBU5g+dCi|Y$7?#3C(fQX>4xgPPQMm~x)>h=HwJlTp3`p@i|f~JTI5w%uUS87&l4@9 z)oT`Qbm=l-wOOR+{k7%Dk{6tkl3{26{eQc9p3IkNtF8Ye)SL8N&s%Y~W&NVW8X1XW z*A;KbJ+KKsdH((33$tGw?Rs{P`MK4cxR5PB%;w}e9N#N-IZ5@TTAr`k!>1Cn(iVQ@ zl6rR9_V>-_FZdQ^e+r$xVKcXF(Y>7?c%L3mU%j{f&uU<#a29w(7Bet#3xhBt!>lJ5|{msm}2W~jzGz2VV&~ftVXHuD_w1Clc2@_9`W&@wX zkq3><7JZG(C+_`TG<&!B8}rY3=0EZeoBjQ0`R>9I)pPsi{=9$YLmOw?s%s^mlOKOx zX`i>C+kMWPjR#^kIkYye+M1#}Cv|>d?S@Nbr@3#fx@NRCuH@*{R_Qy=$zRX!>n`rC zPipK|F<!*yo2IP5OLgmw|UtMU1$b zr{Ag9hg1?Z+&eGMOr8>EEwI-)d^39$&~bN{&i_z#BCG5SH`|)yL2*BJ9Bq!cUahyj zc*}mhtvQpz6|9N^?v>OOzVgXCBHXj>`ZPNRmu%B@x2)!Y5;%jWtDnm{r-UW|4>@G- diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down@2x.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down@2x.png deleted file mode 100644 index a5ff4ffab5dcd01c4d438dd0d52e5827748b657f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1163 zcmeAS@N?(olHy`uVBq!ia0vp^6+j%o!3HER&ED9_z`)p)>FgX(9OUk#;OXjYW@u?< zrfZ~U$iSd6v2@~TZzo5Qc6-y8sSzSq7PYo)-K4?1(szQ8m`8`?ms>B+x<7bav|jL{ zS%$WVOKz3!EBzI@7pyqClsXo~zFuS|y1m%cKj)<@&BmDNlxJhg4Asmt%!20 zh_Tob6ySSLC@=WZM%RbJiT!HgBKr)#R?M95>o@i1UnN`Z0dZlC5ht z?2#!q+q~w_o#Qo~$`fbLn{-3O9VvUT% zvFnOAAA7*oM9ggpnx}2nXQZ3I{?cr02S!oNu za!EZqZTtJ?^A~)JvOk4R->{k6w&>o@54=y0r?1{y|7SHYQaB4dB8wRq#8g3;(KATp z0|NuodQTU}kcv5P?{4%LPLw(JG5sf_@|)_MiIy8I*u|b7 zcq9`shq=2rp^#7KT;oxC2zFY`zh=TKT=-){<}39_DVdkA_#fH$aM?>0!SqA3mo>A9 z95KvTmdYTb_9=(w&Dm;`u-&$wa$^3;-%;yRG38ZW^fG0k^7(TOcP;r&yxMA=X|;9I zR_2oD#&W9zr)O|ZQE!<3Nacfa!rQvzDW)$OrJvlatW2!ZwOaO7t)OcE<4sau8p@|X zcDkD8JWrNc`oQ+zlGCp)@IG_r@oM>y_i9Id>bmc*`(Lj7!1%%*t77loRo%glcHUvy z)|q@b_aEDlTduonqW7J9b6~08Mi!Gs-GsRo5mln{{?*spjFVdQ&MBb@0I&lWN&o-= diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down@3x.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down@3x.png deleted file mode 100644 index e215f85dbd4b6faa247fcc4ba7af323493b21ef9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1565 zcmdT^`#aMM9R7YSy0 zl-cG}i<27w0A2|v50sXaery)#?;MwS0E6RX-5YmU|) zj9#GsD6_g=Vn(|aQrHkMsxoyNpR;45v1H21dv)(+et7i(vg`2paI_`qWO7$`(3|Ce z7OE(A%kNVV!JFfG*oIl_hfg?d+3M-x#@iEhVx-xAe(#w(y6W&37*Rq=rJMWR_0eD> zgj^cick=GP-D`mj_t_0ioyd4>OM`^lL(e*tS5}cfsl&^1&p4QR+7;~pXu=fxR{m5s zNntTvQW^S;{Lat6nbtQjn@QP6q-~hSWKqW7_aQkA4eG$=)@pqPQdm@vlh7DPZoZGI zoymC2JVQtBd-Gmv5;bSz-8=a0^-vkqoxQ+=En43T@M;xf@0~x^^Bgf6q|>V#<)%CT zWnXDXwMZVZ&}aK|Y7tUqMt(n8+|;6Ady)54p!B6DwEj6mQosEaxo9WfSOCzn`~}dy z2txya9e8IF-YenWD)%Ubdl{LwCL13fhS2v^zgS)wtW zt8S5Il4egsK_bmq&H$B1JiY?M9h+jDgYD+`aO)xjpJiWU+nF7Iqf0XDz{ zCgjouWuI>rR$~IQIMJ&>Ka@+vYa&Z1@?}`!poo%YWqLvu(Ye5ShuzW0^%!f251Ugn zHj8_Hm-DJuCA;VS(71Q(1$2l%!m(m3chXpE7xzkVU26r>MzSG2lo3@wAjIiKprUTPti6PS_q7_$g{9Wf65{AR)-?g zggTXqJ76CXrFy#&-YAv4eROk{Y-gr5WH=+83Pm5R%TnLCc4zgAcz0L9git@dSft{J z4_yKU68>TyV!d(JI6A3q#(=gQv6!d(L{4HO&M7%T>CHh2aOik*Gv~ef>C!CWr0Kda z72?bFapuSSb#ATh^0Ct}Q~WSjSyRUOL`J!kj-6!*`)k$&I4VnMF4#3V)?ufdF1vvp zj7w5V@eJUC)M&RyQ76gsTA>Tm-FV^#K1SLn%&z#z6QgSlB^1P}?iBx6eENm8A|wCu zJz|-5oJ&8NuaV>t&@V+v3*|g&4m9yUry@p)!v)M4tUF z1zQH=4o}-eyqhs@C}CA+JIIBpr6*Qd2->IKChKLVJggyYOg`v{mGl;? UD4E&f?S%oH?cGU@1lpDV0Fl?uQ2+n{ diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/Contents.json b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/Contents.json deleted file mode 100644 index f2d004d01..000000000 --- a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/Contents.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "images" : [ - { - "resizing" : { - "mode" : "9-part", - "center" : { - "mode" : "stretch", - "width" : 1, - "height" : 1 - }, - "cap-insets" : { - "bottom" : 20, - "top" : 18, - "right" : 18, - "left" : 18 - } - }, - "idiom" : "universal", - "filename" : "beveled-blue-button.png", - "scale" : "1x" - }, - { - "resizing" : { - "mode" : "9-part", - "center" : { - "mode" : "stretch", - "width" : 1, - "height" : 1 - }, - "cap-insets" : { - "bottom" : 20, - "top" : 18, - "right" : 18, - "left" : 18 - } - }, - "idiom" : "universal", - "filename" : "beveled-blue-button@2x.png", - "scale" : "2x" - }, - { - "resizing" : { - "mode" : "9-part", - "center" : { - "mode" : "stretch", - "width" : 1, - "height" : 1 - }, - "cap-insets" : { - "bottom" : 30, - "top" : 24, - "right" : 24, - "left" : 24 - } - }, - "idiom" : "universal", - "filename" : "beveled-blue-button@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button.png deleted file mode 100644 index b3c01266d530a5a4b3bd6ca442f080247910a30c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 923 zcmV;M17!S(P)tHWjyXH83L2aOQmTn>mM>GhmHol&oIU z57}Hniv<0ynb|p4?GtwDX`vlUOwrZRa5zL&d%wkE#_L|QR`qlLTH|6uSHMyyJff&t zL3ms^v{Fz_-V$z8(y>M16Jd`g7ZkoR^>~?|O-_~h(_}3g34pa(*p>Rl@n5W@wXCqb z9CtReto+=^e2F8Go1T)`CEkfngdl!gOfW_O9|H`_?4uVieX^oTet#){lDy<9GOMhj zu|$eA1w5iIOZ9}rr05A58CK2y|Lv=u9Q2l}JN#gOG>q47sNICGqG5a-7{=Ej*dE|K zSIN)s!_b@P#fs+M1Lr!NUR1RBHk@rh$GsZUVkOBYZcQfPB%|_LcW>2F5uVQRyELEIl4m6jb9b@&$Jw3le>G(YU)xOZE zg+r$n4xL&!bZX(ysf9zQ77m?SICN^^(5Zz(rxp&K|5SJ~sW`?Qm^#K77~fPIW*%fW zFoLo&sMvjIdHWqW`CNCNq$u;MeYnF3LUZNgMvAj`RBS(0O zt=B8!Wv*)Fn)}Fd?}>Q5-sk-v-XA{4^ZE7jc|H^uXIqH4qBsBm5R9FT+mRBF;39hb zh=e&_ zLdsUTX-=sjHb1185ilb8#SeK`=zv-J#nhWGleiLA^^1e!(8nRXiH&D6t1IaJw}3{k zow!5a*&viR+wHtLt=1Pw^fPI4b8(uKj&dJaMk9Vg~&J~tFF5;?BQk*l-rujKuyaFhLPxP%mJ*Ai0 zK(kLHX_1QF&S@La8MIe6c}BwKG+l?C%s;D_#Gp{G{=X0T^v7qmAJWbCu_U8=pQCCg zGV5r8DQ6Vke^%it@yxwHaMn5p%a^+H7AC=q2x@>w(+@Z`(yF^%aU@9ngGQ8-#`L^G zSxD86xZ*;e#m_H`ODAdJo1TyA8zn4aC)?H`^WCBJcG5oms1z~0-L*IXkXQc~AdH*Z zIsga(7#pMqk;!S%BdQutc+6fq_iUX^IztTGWVes_f^~sd0M0^ zA!^$CWl>NC*HT1@5oP3=k*nj(R>8ORAF-kMTsbNtZTog4H#C0O?E2Jha;H1iqd5sG zN?s$^k#A#9wjwqURYGHc2v9jYnyqJ5p?S}C7e76E?$(Z8I*uoWKlrOgYqm*}0n)LV z7IdF9H^sjU04aejL7sp%u6BSuFD`o*zbq|ObC}($Bmf< zn>gLW8lfKq<;m~JA|L{olFq8z%z=b7mi(0V8GKP8ok8D);GbwlR7Z!B`DH(K>U$i8 z7ecBkab|KwLa!5f^}>RL_TqpC8RLNkWVAiHHPs=e22+LYw@0Uo_&6j>*s;n;A}_|< zA_*T1Qt$h&hk{qX@9EI+X8!N`tV-zKvV<~!rqzx(m-7{ujw0o(MDrA{4YT*2%mZCuw*rAI@m#8`r#czru=tV&wB;h`jW^&Oen{`dxL?Ksz6W$ah^ zqi_o(=;0`x$(6j;X9il{^0ScJJQscqaygOeXepfNOs;UpF3NIE|5w{~0k2oe3+wTj z_YEPxnZQu5}15m;9aV;-3fQGQ)zKV$tV){w2?Fy`mGp%UH(#RhjqCgI*# zJa;dO32WJk%epSYbtGXz*!* z-d3a#I+7@S7y)tcX09_Z@ZC(Bt!zgx%jE6-mvc4jnO2VXKo?@&I&J=0wx#52iEZP# zHRinPtz(v8ht8QlFghk2uPuXh(bK1OAG8$k{TbDSzVpz7W4`o9WObej{?zFU7FQ9E qy$1R~0;`)cM2I;!VB5IXc}H2MTC_#1*A;Sf5C8`4Y{Nuh@B9Ocyu}Lu diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button@3x.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button@3x.png deleted file mode 100644 index cc5e50be29247d2475687f1f3aa74f6e5541ce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*Q1W7^m$PzUNp}Z7SnKo;j^Vo3NP4Ks1+1cDSh2zg6~QZZ9>dk#KT&x zvPp%^EQ!$&ta8iJ)zxS1)t~(B63=M-X|o3*o^YIn3J_OB6!ZjU3@SYa;p@W=X6C`9 zO6HdHetTspP@Jd}JBRTcZwpad2V*>GvO<6YV%a-0CCObCAGR`Q1E?|lxt4YdI5&Wr z8ZN^uoG8c}A3*ZM&ue}ly6#!jnjIwfo_1zj8KZUrVm+-5)GCKXsLaa=J^(-x1#C-=2HH!1|?! z60spZF@LAB;LUAI$x^((@$(Q;2Y|03RY!QofMbMb zcqgw;Lh9xsz0091*YT;m>p|941%vpwFb1vx`d z-Aj*uV%;{po&xdxyMXbXiI-;v9@M}7N#&-LZmr-uFFT zw8>~zluk%0Q$ze!i^Y%D@3Xq=1*1^%0=UMI>_X~-Nu@Ezs1bK+6TmBNQ=&5r?6Z8F z^VkC|yhDdgQFJmww7efPp>J`i>_*AcAskn0T;o3YDq2#InYIBxksiz1gli8*4eL{U zwK$g1<)E2HQA9=Z!woVZX4R{(__JP3fYN82^n`X~Jhri9oM diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button@3x.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button@3x.png deleted file mode 100644 index fbd65edbd65a5244778dc0df708451fe48b006f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2177 zcmds2`#aMM9RAL2i;y^5sFfVIa*0VQ>CB8qR$H}`yC$WGG-^x?$z=|43UgaW4~|PJ zQ)Y833906mk}$W;gqfuwV z?Iy?&rOoLn_$&heQ2Z4X>NE-O?63!eM%h>%wy`m@GPeW(UDB% zVq%*s3W|#9f9*ua7+=wOwABW|T{|s#^R1C?J-Bbk#3gvmV*&Q`+<=RQiOJC*VnUH5 zO{cS9s9r#7mKOCj3gQu2xP#0JSZ(kJNQUD5!RZ3LTJ9Zfed;TPM+)M;_IvM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|GN zFS)^9;m6l7f%~Do;S=FF2*G^6 z3KtvoEoQsqyM|cb+V)KAO&(4G>k5sKe19_@ahd$~xW>`Dx19uvDp@cVUGwoFkStug zRJp?=1uENv-5=3>g9j7sy4dO=u`p<;_R(ODZ%{W~wS#YcVviTnwO6tI0+CcFQ7v?6 zsTn$+txddIHFGi_K~tktPp}pC(y*a3j=%xpX$F^80F~|_HF*(qtPrFXz*DE!f;9V? zqq-%i{ITw{{dX`yYCk5obbaoA+C(7;UzBaV=(0;MBhYfw179U#@EB)vDw8&#-u1r^ z2&o&@*?EZHok8(MCAgxzeV~7;Yw{4CWm`Q9fiW*1Gq0EN;7F8HCd$l6O{R}Im8eTU ztN{MFt}GxV!pq0}3VnCKphKE@bI{!*|3#C!X`NmjIH|91`;`;gOi0{70!s>Zws*)! zWzEKQ@RwuP(`Py86i>0+N_J(L+{y_kLGR5&T{WGLPrKf-7y=Id)iD?K$V=QbalCiQ zxl)7-;yF^J7qhOp`++qQSSG=U(qZjm&QwFpvx+tjbsM;6!=}T~XkFQO6_aDjB*6uf zX>#J6V71pV@QYOn6x(UuSeJ_zyNG7)dfzW!Yjo_|MuEP46COxt?8U5bx-wllUcV wYiDB^x~1iNm+!K4MSQ!#V@J*pCCT|;Ol6Pw2tkqqSow7Tf}6K%9gdRzFO!nnF8}}l diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/Contents.json b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/Contents.json deleted file mode 100644 index 41572b805..000000000 --- a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/Contents.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "images" : [ - { - "resizing" : { - "mode" : "9-part", - "center" : { - "mode" : "stretch", - "width" : 1, - "height" : 1 - }, - "cap-insets" : { - "bottom" : 10, - "top" : 9, - "right" : 9, - "left" : 9 - } - }, - "idiom" : "universal", - "filename" : "beveled-secondary-button.png", - "scale" : "1x" - }, - { - "resizing" : { - "mode" : "9-part", - "center" : { - "mode" : "stretch", - "width" : 1, - "height" : 1 - }, - "cap-insets" : { - "bottom" : 20, - "top" : 18, - "right" : 18, - "left" : 18 - } - }, - "idiom" : "universal", - "filename" : "beveled-secondary-button@2x.png", - "scale" : "2x" - }, - { - "resizing" : { - "mode" : "9-part", - "center" : { - "mode" : "stretch", - "width" : 1, - "height" : 1 - }, - "cap-insets" : { - "bottom" : 30, - "top" : 24, - "right" : 24, - "left" : 24 - } - }, - "idiom" : "universal", - "filename" : "beveled-secondary-button@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button.png deleted file mode 100644 index 9a10598188b37f843ab5625c4699d6a34493b3b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 973 zcmV;;12X)HP)%EyY*(%#9N^JaE@E5RE)=Cj6DLZRogP!w@8p)j7x#x4g_ny^>~S&Y)+Nd$@bm$(zznQ4jb;%%6O86$wg1fvA;)5nm^e!A(WM^;qG@BPl7Vp(!knRN;n zERiBj4xgxbsh*IS6g?p$L&5I<-@cm3f&Nl;cL1s%EbFBMYBu1rXj$+3mi2i6u6sDk zmh+eQVDMG+Vp;Rzy7mV&9TW+?hM+2`;U zBCGOM7qGnpopQc$;R`h$XU~vDN{#>k010qNS#tmY3ljhU3ljkVnw%H_00HqyL_t(& zf$f?1kX)d>0|Ob_#X}@2 zvbbab2^?(We;Mplgr!m&$K}!iQ@PS_|!Gp zF{Hw&?3a4A(tFixqtx~As6 zDRXLx<68k7?o_sOo|8Sb#IYlQ)~5Y>{)E)ADSr2%Y!t$>QwYmWAuKzEu<3}qJ2L0NQ2^GRyUcgZGhiohpFp2?wB@gRS%L(ui(DIr4JACA zpdJ1Av^os{Boc$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q>}T7ZHUR zTUBL0|1nY|*_$e`?os%z6w&&!c|;RicN6Q;xk}Q`N!)4X6{H&YJR``>%noFLCRiO$&d?IHr+PyqvobQda?do9=F;=1GNRjeLUY21y6z9KaIyDe>7!rCCH%oS59btHzsX!8I%^^ z{^voiYa@3{#!IaRc%Hk_j@tZUiUStn5Rb!bA*#epj8N7h4gVMRCn>0LMBPssd`2j! zQQe2^f0OD4vrrxjxYf7E<6P0*wm?^Pxm?>^{P$8;I33=oepf%;)f54sj)W*rgNb0Y$Rpr>_Ua%UP(Id!P#$a4?ZxC7=hrbAV3Ivr|OQsa-WvhUQu^@o7fBZkq4k&2;VS11-< z8ip(={?aa=Y#>+m2pc=R;Kg;d$?HF`z zh_RE)*v7n2rcx%kwZpqvcC+Fnhf0$-dVNSXMp<(oul^yk5+8TCkYzAwyOsL3UA!}R zSpk~m=kwMd52zn_k6oH#Nvxk}F&z)t-QH6ry_)N=U*?~TYY%tqo&@4~>(U>5_%^@U zMQBg(pYHu1m`MDzpY3iK32ZF9K~c0%C1Fdnh8z#+8apssV(%5Udp_Y!A|^HVl80$i z8$%OC!&vAAppCx%qb61U+Z{9iaXaCbXaB22%9oN#N`M-Re|^{bR(|?ui~fH>=-myD zl_r-W0@rJ7q~#Xeus4V{=W-B(J>f0g_+Brk=+k%7;YL1_x3+=(w?s@Jd2 zUd9b|(sNg0Wb4Rf)A(opnV;vsxyKMc%(gK460uQ!k_@VQIV6iG-Ocp}omR#Ig zWLdRLJo|xUi?8NGVHWa`>AZwdLf{nn@@5%PsDuVTFr;2o+_B%GJPIlJu8A22eB&?LZ|Nhr<_W)o>LD3`=kAriVkqQm76CoO$)g<4ZENZOBFCTv4GVXyCwY_ DAeCr* diff --git a/WordPressAuthenticator/Signin/LoginLinkRequestViewController.swift b/WordPressAuthenticator/Signin/LoginLinkRequestViewController.swift index fcaebd021..38a0bf987 100644 --- a/WordPressAuthenticator/Signin/LoginLinkRequestViewController.swift +++ b/WordPressAuthenticator/Signin/LoginLinkRequestViewController.swift @@ -10,7 +10,7 @@ import WordPressShared class LoginLinkRequestViewController: LoginViewController { @IBOutlet var gravatarView: UIImageView? @IBOutlet var label: UILabel? - @IBOutlet var sendLinkButton: NUXSubmitButton? + @IBOutlet var sendLinkButton: NUXButton? @IBOutlet var usePasswordButton: UIButton? override var sourceTag: WordPressSupportSourceTag { get { From 44edf1f733a40415a77725dca10f56c7d89cdc0f Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 3 Jul 2018 11:17:11 -0500 Subject: [PATCH 05/28] Delete unused image asset methods. Remove extra line (make code style consistent) in NUXButton --- .../Extensions/UIImage+Assets.swift | 36 ------------------- WordPressAuthenticator/NUX/NUXButton.swift | 3 +- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/WordPressAuthenticator/Extensions/UIImage+Assets.swift b/WordPressAuthenticator/Extensions/UIImage+Assets.swift index 2b7831ec7..8e3bb0409 100644 --- a/WordPressAuthenticator/Extensions/UIImage+Assets.swift +++ b/WordPressAuthenticator/Extensions/UIImage+Assets.swift @@ -12,7 +12,6 @@ extension UIImage { return UIImage(named: "site-address-modal", in: bundle, compatibleWith: nil)! } - /// Returns the Default Gravatar Placeholder Image. /// @objc @@ -27,41 +26,6 @@ extension UIImage { return UIImage(named: "google", in: bundle, compatibleWith: nil)! } - /// Returns the Link Image. - /// - @objc - public static var beveledBlueButtonImage: UIImage { - return UIImage(named: "beveled-blue-button", in: bundle, compatibleWith: nil)! - } - - /// Returns the Link Image. - /// - @objc - public static var belevedBlueButtonDownImage: UIImage { - return UIImage(named: "beveled-blue-button-down", in: bundle, compatibleWith: nil)! - } - - /// Returns the Link Image. - /// - @objc - public static var beveledSecondaryButtonImage: UIImage { - return UIImage(named: "beveled-secondary-button", in: bundle, compatibleWith: nil)! - } - - /// Returns the Link Image. - /// - @objc - public static var beveledSecondaryButtonDownImage: UIImage { - return UIImage(named: "beveled-secondary-button-down", in: bundle, compatibleWith: nil)! - } - - /// Returns the Link Image. - /// - @objc - public static var beveledDisabledButtonImage: UIImage { - return UIImage(named: "beveled-disabled-button", in: bundle, compatibleWith: nil)! - } - /// Returns WordPressAuthenticator's Bundle /// private static var bundle: Bundle { diff --git a/WordPressAuthenticator/NUX/NUXButton.swift b/WordPressAuthenticator/NUX/NUXButton.swift index 44765fcaa..de401068e 100644 --- a/WordPressAuthenticator/NUX/NUXButton.swift +++ b/WordPressAuthenticator/NUX/NUXButton.swift @@ -3,8 +3,7 @@ import WordPressShared import WordPressUI /// A protocol for an element that can display a UIActivityIndicatorView -@objc -public protocol ActivityIndicatorButton { +@objc public protocol ActivityIndicatorButton { func showActivityIndicator(_ show: Bool) } From c10d3d074a20d79f39aa196453e1d75e04365063 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 3 Jul 2018 11:37:38 -0500 Subject: [PATCH 06/28] Allows all standard `UIButton` buttons to be styled using UIAppearance --- WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift | 1 + WordPressAuthenticator/Signin/Login.storyboard | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift b/WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift index 51f0d70de..20ffe0fa6 100644 --- a/WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift +++ b/WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift @@ -7,6 +7,7 @@ final class SubheadlineButton: UIButton { super.traitCollectionDidChange(previousTraitCollection) if previousTraitCollection?.preferredContentSizeCategory != traitCollection.preferredContentSizeCategory { titleLabel?.font = WPStyleGuide.mediumWeightFont(forStyle: .subheadline) + titleLabel?.textColor = WPStyleGuide.wordPressBlue() } } } diff --git a/WordPressAuthenticator/Signin/Login.storyboard b/WordPressAuthenticator/Signin/Login.storyboard index a032d6a6b..cb0152b34 100644 --- a/WordPressAuthenticator/Signin/Login.storyboard +++ b/WordPressAuthenticator/Signin/Login.storyboard @@ -976,9 +976,7 @@