From 53a7cd5c8a5398b7e58b62cdaf42581e60a80102 Mon Sep 17 00:00:00 2001 From: Martin Walsh Date: Thu, 24 Nov 2016 17:01:23 +0000 Subject: [PATCH] Updated latest changes to Swift 3 --- Lock/AuthCollectionView.swift | 4 ++-- Lock/Connections.swift | 2 +- Lock/EnterpriseDomainPresenter.swift | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Lock/AuthCollectionView.swift b/Lock/AuthCollectionView.swift index cd73b8958..acdd6df3a 100644 --- a/Lock/AuthCollectionView.swift +++ b/Lock/AuthCollectionView.swift @@ -143,8 +143,8 @@ class AuthCollectionView: UIView, View { func oauth2Buttons(forConnections connections: [OAuth2Connection], customStyle: [String: AuthStyle], isLogin login: Bool, onAction: @escaping (String) -> ()) -> [AuthButton] { return connections.map { connection -> AuthButton in let style = customStyle[connection.name] ?? connection.style - let button = AuthButton(size: .Big) - button.title = login ? style.localizedLoginTitle().uppercaseString : style.localizedSignUpTitle().uppercaseString + let button = AuthButton(size: .big) + button.title = login ? style.localizedLoginTitle().uppercased() : style.localizedSignUpTitle().uppercased() button.normalColor = style.normalColor button.highlightedColor = style.highlightedColor button.titleColor = style.foregroundColor diff --git a/Lock/Connections.swift b/Lock/Connections.swift index 338c58ef4..b00b05a7a 100644 --- a/Lock/Connections.swift +++ b/Lock/Connections.swift @@ -65,7 +65,7 @@ public struct EnterpriseConnection : OAuth2Connection { public let name: String public let domains: [String] public let style: AuthStyle - + init(name: String, domains: [String], style: AuthStyle? = nil) { self.name = name self.domains = domains diff --git a/Lock/EnterpriseDomainPresenter.swift b/Lock/EnterpriseDomainPresenter.swift index fd377705a..9f083551e 100644 --- a/Lock/EnterpriseDomainPresenter.swift +++ b/Lock/EnterpriseDomainPresenter.swift @@ -125,8 +125,8 @@ class EnterpriseDomainPresenter: Presentable, Loggable { func EnterpriseButton(forConnections connections: [EnterpriseConnection], customStyle: [String: AuthStyle], isLogin login: Bool, onAction: @escaping () -> () ) -> AuthButton? { guard let connection = connections.first, connections.count == 1 else { return nil } let style = customStyle[connection.name] ?? connection.style - let button = AuthButton(size: .Big) - button.title = style.localizedLoginTitle(connection.domains.first).uppercaseString + let button = AuthButton(size: .big) + button.title = style.localizedLoginTitle(title: connection.domains.first).uppercased() button.normalColor = style.normalColor button.highlightedColor = style.highlightedColor button.titleColor = style.foregroundColor