Skip to content

Instantly share code, notes, and snippets.

@Bashta
Created April 5, 2016 09:18
Show Gist options
  • Save Bashta/88e58f41e5e11242f28212625b40c2c6 to your computer and use it in GitHub Desktop.
Save Bashta/88e58f41e5e11242f28212625b40c2c6 to your computer and use it in GitHub Desktop.
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