diff --git a/Podfile b/Podfile index 74edfb0..357a4d8 100644 --- a/Podfile +++ b/Podfile @@ -11,6 +11,7 @@ target 'librx' do pod 'Appirater' pod 'SDWebImage', '~>3.7' pod 'WeiboSDK', :git => 'https://github.com/sinaweibosdk/weibo_ios_sdk.git', :tag => '3.1.3' + pod 'SwiftColors' # pod 'WebViewJavascriptBridge', '~> 4.0.1' # pod 'Toast', '~> 2.4’ end diff --git a/Podfile.lock b/Podfile.lock index 95766cd..2639af4 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -9,6 +9,7 @@ PODS: - SDWebImage/Core (= 3.7.3) - SDWebImage/Core (3.7.3) - Spring (1.0.3) + - SwiftColors (0.3.1) - SwiftyJSON (2.3.1) - WeiboSDK (3.1.3) @@ -19,6 +20,7 @@ DEPENDENCIES: - RESideMenu (~> 4.0.7) - SDWebImage (~> 3.7) - Spring (from `https://github.com/MengTo/Spring.git`, branch `swift2`) + - SwiftColors - SwiftyJSON (~> 2.3.1) - WeiboSDK (from `https://github.com/sinaweibosdk/weibo_ios_sdk.git`, tag `3.1.3`) @@ -46,6 +48,7 @@ SPEC CHECKSUMS: RESideMenu: f24c508404b49c667344c54aba7e590883533958 SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84 Spring: 3f02b5dc3308572ef177b3cad0fa7bbc4b0706f7 + SwiftColors: 61efe0bf991cfed446684e03d1e9f635f1f11a84 SwiftyJSON: 592b53bee5ef3dd9b3bebc6b9cb7ee35426ae8c3 WeiboSDK: 5f2a707c4569a64f4641f4171acd712016f24342 diff --git a/librx/Base.lproj/Main.storyboard b/librx/Base.lproj/Main.storyboard index 7943b59..80043ed 100644 --- a/librx/Base.lproj/Main.storyboard +++ b/librx/Base.lproj/Main.storyboard @@ -1109,7 +1109,7 @@ - + @@ -1118,24 +1118,29 @@ - + - - + + + + - + @@ -1175,28 +1182,33 @@ - + + + - + - - + + - + - + + + - - + - + - + + @@ -1717,6 +1766,7 @@ + @@ -1734,7 +1784,7 @@ + - diff --git a/librx/LoginViewController.swift b/librx/LoginViewController.swift index c401fbb..1486d06 100644 --- a/librx/LoginViewController.swift +++ b/librx/LoginViewController.swift @@ -17,6 +17,8 @@ class LoginViewController: UIViewController { @IBOutlet weak var emailTextField: UITextField! @IBOutlet weak var passwordTextField: UITextField! @IBOutlet weak var loginButton: UIButton! + + @IBOutlet weak var backupButton: UIButton! weak var delegate: LoginViewControllerDelegate? @@ -25,7 +27,18 @@ class LoginViewController: UIViewController { super.viewDidLoad() passwordTextField.secureTextEntry = true self.loginButton.layer.borderWidth = 1 - self.loginButton.layer.borderColor = UIColor.lightGrayColor().CGColor + self.loginButton.layer.borderColor = UIColor(hexString: "#3FB5A3")?.CGColor + self.loginButton.tintColor = UIColor(hexString: "#3FB5A3") + + self.loginButton.layer.cornerRadius = 5 + self.loginButton.clipsToBounds = true + + self.backupButton.layer.cornerRadius = self.backupButton.frame.width / 2 + self.backupButton.clipsToBounds = true + self.backupButton.layer.borderWidth = 1 + self.backupButton.layer.borderColor=UIColor(hexString: "#3FB5A3")?.CGColor + self.backupButton.tintColor = UIColor(hexString: "#3FB5A3") + self.backupButton.backgroundColor = UIColor(hexString: "#3FB5A3") } diff --git a/librx/LogupViewController.swift b/librx/LogupViewController.swift index 1bc921c..e7805bf 100644 --- a/librx/LogupViewController.swift +++ b/librx/LogupViewController.swift @@ -7,6 +7,7 @@ // import UIKit +import SwiftColors class LogupViewController: UIViewController { @@ -14,6 +15,8 @@ class LogupViewController: UIViewController { @IBOutlet weak var passwordTextField: UITextField! @IBOutlet weak var signupButton: UIButton! @IBOutlet weak var backButton: UIButton! + @IBOutlet weak var emailTextField: UITextField! + func alert(message: String) { let alc = UIAlertController(title: message, message: nil, preferredStyle: UIAlertControllerStyle.Alert) @@ -25,11 +28,21 @@ class LogupViewController: UIViewController { super.viewDidLoad() self.passwordTextField.secureTextEntry = true self.signupButton.layer.borderWidth = 1 - self.signupButton.layer.borderColor = UIColor.lightGrayColor().CGColor + self.signupButton.layer.borderColor = UIColor(hexString: "#3FB5A3")?.CGColor + self.signupButton.tintColor = UIColor(hexString: "#3FB5A3") + self.signupButton.layer.cornerRadius = 5 + self.signupButton.clipsToBounds = true + + self.backButton.layer.cornerRadius = self.backButton.frame.width / 2 + self.backButton.clipsToBounds = true + self.backButton.layer.borderWidth = 1 + self.backButton.layer.borderColor=UIColor(hexString: "#3FB5A3")?.CGColor + self.backButton.tintColor = UIColor(hexString: "#3FB5A3") + self.backButton.backgroundColor = UIColor(hexString: "#3FB5A3") + } - @IBAction func sigupBtnPressed(sender: AnyObject) { let username: String = usernameTextField.text!