diff --git a/Podfile.lock b/Podfile.lock index 1d890919d..46cd50216 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,20 +1,5 @@ PODS: - 1PasswordExtension (1.8.5) - - AFNetworking (3.2.1): - - AFNetworking/NSURLSession (= 3.2.1) - - AFNetworking/Reachability (= 3.2.1) - - AFNetworking/Security (= 3.2.1) - - AFNetworking/Serialization (= 3.2.1) - - AFNetworking/UIKit (= 3.2.1) - - AFNetworking/NSURLSession (3.2.1): - - AFNetworking/Reachability - - AFNetworking/Security - - AFNetworking/Serialization - - AFNetworking/Reachability (3.2.1) - - AFNetworking/Security (3.2.1) - - AFNetworking/Serialization (3.2.1) - - AFNetworking/UIKit (3.2.1): - - AFNetworking/NSURLSession - Alamofire (4.7.2) - CocoaLumberjack (3.4.2): - CocoaLumberjack/Default (= 3.4.2) @@ -37,11 +22,11 @@ PODS: - GoogleToolboxForMac/Defines (= 2.1.4) - "GoogleToolboxForMac/NSString+URLArguments (= 2.1.4)" - "GoogleToolboxForMac/NSString+URLArguments (2.1.4)" - - Gridicons (0.15) + - Gridicons (0.16) - lottie-ios (2.5.0) - NSObject-SafeExpectations (0.0.3) - "NSURL+IDN (0.3)" - - OCMock (3.4.1) + - OCMock (3.4.2) - OHHTTPStubs (6.1.0): - OHHTTPStubs/Default (= 6.1.0) - OHHTTPStubs/Core (6.1.0) @@ -60,18 +45,17 @@ PODS: - Specta (1.0.7) - SVProgressHUD (2.2.5) - UIDeviceIdentifier (0.5.0) - - WordPressKit (1.0.5): - - AFNetworking (= 3.2.1) - - Alamofire (= 4.7.2) + - WordPressKit (1.1): + - Alamofire (~> 4.7) - CocoaLumberjack (= 3.4.2) - NSObject-SafeExpectations (= 0.0.3) - UIDeviceIdentifier (~> 0.4) - - WordPressShared (= 1.0.3) + - WordPressShared (~> 1.0.3) - wpxmlrpc (= 0.8.3) - - WordPressShared (1.0.3): + - WordPressShared (1.0.8): - CocoaLumberjack (~> 3.4) - FormatterKit/TimeIntervalFormatter (= 1.8.2) - - WordPressUI (1.0.2) + - WordPressUI (1.0.5) - wpxmlrpc (0.8.3) DEPENDENCIES: @@ -97,7 +81,6 @@ DEPENDENCIES: SPEC REPOS: https://github.com/cocoapods/specs.git: - 1PasswordExtension - - AFNetworking - Alamofire - CocoaLumberjack - Expecta @@ -120,27 +103,26 @@ SPEC REPOS: SPEC CHECKSUMS: 1PasswordExtension: 0e95bdea64ec8ff2f4f693be5467a09fac42a83d - AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057 Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223 CocoaLumberjack: db7cc9e464771f12054c22ff6947c5a58d43a0fd Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5 FormatterKit: 4b8f29acc9b872d5d12a63efb560661e8f2e1b98 GoogleSignInRepacked: d357702618c555f38923576924661325eb1ef22b GoogleToolboxForMac: 91c824d21e85b31c2aae9bb011c5027c9b4e738f - Gridicons: 0e5e76ad9fc6f7cbc3da137a9751ef516c5aef73 + Gridicons: 8cc5cb666d5ad8b8f1771d3c7a93d27ae25b7c2e lottie-ios: d699fdee68d7b63e721d949388b015fef1aaa4ac NSObject-SafeExpectations: b989b68a8a9b7b9f2b264a8b52ba9d7aab8f3129 "NSURL+IDN": 82355a0afd532fe1de08f6417c134b49b1a1c4b3 - OCMock: 2cd0716969bab32a2283ff3a46fd26a8c8b4c5e3 + OCMock: ebe9ee1dca7fbed0ff9193ac0b3e2d8862ea56f6 OHHTTPStubs: 1e21c7d2c084b8153fc53d48400d8919d2d432d0 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 UIDeviceIdentifier: a959a6d4f51036b4180dd31fb26483a820f1cc46 - WordPressKit: afe6d2c23db6d4f110638c25e86b029e899ffc34 - WordPressShared: b8e910d8133a54e9452ab7bd9d8e27e78dc2f5ba - WordPressUI: 70bceaff582bdd6fd8f3ed67aaa200e72fce245d + WordPressKit: a24baaa783c3a221f2d9a51c19318cbb27333373 + WordPressShared: 063e1e8b1a7aaf635abf17f091a2d235a068abdc + WordPressUI: ab90086350f1e26bf39e578e443d0abf0347e542 wpxmlrpc: bfc572f62ce7ee897f6f38b098d2ba08732ecef4 PODFILE CHECKSUM: adec9882e25404ab01a7a461fcdd3ddd937d5ba6 -COCOAPODS: 1.5.2 +COCOAPODS: 1.5.3 diff --git a/WordPressAuthenticator.xcodeproj/project.pbxproj b/WordPressAuthenticator.xcodeproj/project.pbxproj index cc7863ac4..037de098a 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 */, @@ -734,7 +731,6 @@ "${BUILT_PRODUCTS_DIR}/OHHTTPStubs/OHHTTPStubs.framework", "${BUILT_PRODUCTS_DIR}/Specta/Specta.framework", "${BUILT_PRODUCTS_DIR}/1PasswordExtension/OnePasswordExtension.framework", - "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework", "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", "${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework", "${BUILT_PRODUCTS_DIR}/FormatterKit/FormatterKit.framework", @@ -758,7 +754,6 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OHHTTPStubs.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Specta.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OnePasswordExtension.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FormatterKit.framework", @@ -844,7 +839,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/Authenticator/WordPressAuthenticator.swift b/WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift index cebb55ba1..96a20ec3e 100644 --- a/WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift +++ b/WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift @@ -6,7 +6,6 @@ import WordPressShared import WordPressUI - // MARK: - WordPress Credentials // public enum WordPressCredentials { @@ -179,6 +178,32 @@ public struct WordPressAuthenticatorConfiguration { } +// MARK: - WordPress Authenticator Styles +// +public struct WordPressAuthenticatorStyle { + /// Alternative logins link color + /// + let linkColor: UIColor + + /// Alternative logins highlight color + /// + let highlightColor: UIColor + + /// Designated initializer + /// + public init(linkColor: UIColor, highlightColor: UIColor) { + self.linkColor = linkColor + self.highlightColor = highlightColor + } +} + +public extension WordPressAuthenticatorStyle { + static var defaultStyle: WordPressAuthenticatorStyle { + return WordPressAuthenticatorStyle(linkColor: WPStyleGuide.wordPressBlue(), highlightColor: WPStyleGuide.lightBlue()) + } +} + + // MARK: - WordPressAuthenticator: Public API to deal with WordPress.com and WordPress.org authentication. // @objc public class WordPressAuthenticator: NSObject { @@ -205,6 +230,10 @@ public struct WordPressAuthenticatorConfiguration { /// public let configuration: WordPressAuthenticatorConfiguration + /// Authenticator's Styles. + /// + public let style: WordPressAuthenticatorStyle + /// Notification to be posted whenever the signing flow completes. /// @objc public static let WPSigninDidFinishNotification = "WPSigninDidFinishNotification" @@ -224,18 +253,19 @@ public struct WordPressAuthenticatorConfiguration { /// Designated Initializer /// - private init(configuration: WordPressAuthenticatorConfiguration) { + private init(configuration: WordPressAuthenticatorConfiguration, style: WordPressAuthenticatorStyle) { self.configuration = configuration + self.style = style } /// Initializes the WordPressAuthenticator with the specified Configuration. /// - public static func initialize(configuration: WordPressAuthenticatorConfiguration) { + public static func initialize(configuration: WordPressAuthenticatorConfiguration, style: WordPressAuthenticatorStyle) { guard privateInstance == nil else { fatalError("WordPressAuthenticator is already initialized") } - privateInstance = WordPressAuthenticator(configuration: configuration) + privateInstance = WordPressAuthenticator(configuration: configuration, style: style) } // MARK: - Public Methods 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/Extensions/WPStyleGuide+Login.swift b/WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift index 51f0d70de..0dcc4ef1f 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() } } } @@ -102,8 +103,8 @@ extension WPStyleGuide { class func googleLoginButton() -> UIButton { let baseString = NSLocalizedString("{G} Log in with Google.", comment: "Label for button to log in using Google. The {G} will be replaced with the Google logo.") - let attrStrNormal = googleButtonString(baseString, linkColor: WPStyleGuide.wordPressBlue()) - let attrStrHighlight = googleButtonString(baseString, linkColor: WPStyleGuide.lightBlue()) + let attrStrNormal = googleButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.linkColor) + let attrStrHighlight = googleButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.highlightColor) let font = WPStyleGuide.mediumWeightFont(forStyle: .subheadline) @@ -117,8 +118,8 @@ extension WPStyleGuide { class func selfHostedLoginButton() -> UIButton { let baseString = NSLocalizedString("Log in by entering your site address.", comment: "Label for button to log in using your site address.") - let attrStrNormal = selfHostedButtonString(baseString, linkColor: WPStyleGuide.wordPressBlue()) - let attrStrHighlight = selfHostedButtonString(baseString, linkColor: WPStyleGuide.lightBlue()) + let attrStrNormal = selfHostedButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.linkColor) + let attrStrHighlight = selfHostedButtonString(baseString, linkColor: WordPressAuthenticator.shared.style.highlightColor) let font = WPStyleGuide.mediumWeightFont(forStyle: .subheadline) diff --git a/WordPressAuthenticator/NUX/NUXButton.swift b/WordPressAuthenticator/NUX/NUXButton.swift index 5cce173dc..16feed83f 100644 --- a/WordPressAuthenticator/NUX/NUXButton.swift +++ b/WordPressAuthenticator/NUX/NUXButton.swift @@ -1,54 +1,285 @@ 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.DefaultRenderMetrics.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 b15f9866e..000000000 --- a/WordPressAuthenticator/NUX/NUXSubmitButton.swift +++ /dev/null @@ -1,154 +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 { - @IBInspectable open var isPrimary: Bool = false { - didSet { - configureButton() - } - } - @objc let cornerRadius = CGFloat(5.0) - - @objc var isAnimating: Bool { - get { - return activityIndicator.isAnimating - } - } - - @objc let activityIndicator: UIActivityIndicatorView = { - let indicator = UIActivityIndicatorView(activityIndicatorStyle: .white) - indicator.hidesWhenStopped = true - return indicator - }() - - - override open var isEnabled: Bool { - didSet { - configureBorderColor() - } - } - - - override open var isHighlighted: Bool { - didSet { - configureBorderColor() - } - } - - - // MARK: - LifeCycle Methods - - override open func awakeFromNib() { - super.awakeFromNib() - configureButton() - } - - - 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: - Configuration - - - /// Configure the appearance of the configure button. - /// - @objc func configureButton() { - contentEdgeInsets = UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 15) - - layer.cornerRadius = cornerRadius - layer.borderWidth = 1 - layer.borderColor = UIColor.white.cgColor - clipsToBounds = true - - titleLabel?.font = WPFontManager.systemSemiBoldFont(ofSize: 17.0) - - 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) - } - 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) - - addSubview(activityIndicator) - } - - - /// Configures the border color. - /// - @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 - } - - - // 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() - } - configureBorderColor() - setNeedsLayout() - } - - func didChangePreferredContentSize() { - titleLabel?.adjustsFontForContentSizeCategory = true - } -} - -extension NUXSubmitButton { - override open func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { - super.traitCollectionDidChange(previousTraitCollection) - if previousTraitCollection?.preferredContentSizeCategory != traitCollection.preferredContentSizeCategory { - didChangePreferredContentSize() - } - } -} 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 7aff33a29..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down.png and /dev/null differ 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 a5ff4ffab..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down@2x.png and /dev/null differ 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 e215f85db..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button-down.imageset/beveled-blue-button-down@3x.png and /dev/null differ 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 b3c01266d..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button.png and /dev/null differ diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button@2x.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button@2x.png deleted file mode 100644 index bba07e1c9..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button@2x.png and /dev/null differ 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 cc5e50be2..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-blue-button.imageset/beveled-blue-button@3x.png and /dev/null differ diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/Contents.json b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/Contents.json deleted file mode 100644 index 36f066395..000000000 --- a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-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-disabled-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-disabled-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-disabled-button@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button.png deleted file mode 100644 index 71ec5dbce..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button.png and /dev/null differ diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button@2x.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button@2x.png deleted file mode 100644 index 73798f399..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button@2x.png and /dev/null differ 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 fbd65edbd..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-disabled-button.imageset/beveled-disabled-button@3x.png and /dev/null differ diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/Contents.json b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/Contents.json deleted file mode 100644 index 793102711..000000000 --- a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-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" : 10, - "top" : 9, - "right" : 9, - "left" : 9 - } - }, - "idiom" : "universal", - "filename" : "beveled-secondary-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-secondary-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-secondary-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-secondary-button-down.imageset/beveled-secondary-button-down.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down.png deleted file mode 100644 index 335246516..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down.png and /dev/null differ diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down@2x.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down@2x.png deleted file mode 100644 index b6f06c154..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down@2x.png and /dev/null differ diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down@3x.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down@3x.png deleted file mode 100644 index 481d5837e..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button-down.imageset/beveled-secondary-button-down@3x.png and /dev/null differ 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 9a1059818..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button.png and /dev/null differ diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button@2x.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button@2x.png deleted file mode 100644 index c8b665ca0..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button@2x.png and /dev/null differ diff --git a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button@3x.png b/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button@3x.png deleted file mode 100644 index 12c15e210..000000000 Binary files a/WordPressAuthenticator/Resources/Assets.xcassets/beveled-secondary-button.imageset/beveled-secondary-button@3x.png and /dev/null differ 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 @@