Created
April 5, 2016 09:18
-
-
Save Bashta/88e58f41e5e11242f28212625b40c2c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
final class SignUpViewController: UIViewController { | |
static let storybuardId = "signUpViewController" | |
@IBOutlet private weak var signUpButton: UIButton? | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
setupUI() | |
} | |
override func viewWillAppear(animated: Bool) { | |
super.viewWillAppear(animated) | |
navigationController?.navigationBarHidden = true | |
} | |
override func viewWillDisappear(animated: Bool) { | |
super.viewWillDisappear(animated) | |
navigationController?.navigationBarHidden = false | |
} | |
} | |
extension SignUpViewController { | |
//MARK:- Action Buttons | |
@IBAction func singUpButtonTapped(sender: UIButton) { | |
} | |
@IBAction func logInButtontapped(sender: UIButton) { | |
guard let loginViewController = storyboard?.instantiateViewControllerWithIdentifier(LoginViewController.storyboardId) else { | |
return | |
} | |
navigationController?.pushViewController(loginViewController, animated: true) | |
} | |
} | |
private extension SignUpViewController { | |
//MARK:- UI Setup | |
func setupUI() { | |
signUpButton?.layer.borderColor = UIColor.whiteColor().CGColor | |
signUpButton?.layer.borderWidth = 1 | |
signUpButton?.layer.cornerRadius = (signUpButton?.bounds.height ?? 0) / 2 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment