Skip to content

Instantly share code, notes, and snippets.

@heriwijoyo
Last active December 20, 2016 04:06
Show Gist options
  • Save heriwijoyo/18133df893f7f27cf786b23c471a26fb to your computer and use it in GitHub Desktop.
Save heriwijoyo/18133df893f7f27cf786b23c471a26fb to your computer and use it in GitHub Desktop.
// taken from release/0.2
internal class OnboardingViewController: UIViewController {
...
private func pushRegistrationPage() {
let registerViewController = RegisterViewController()
navigationController?.pushViewController(registerViewController, animated: true)
}
private func pushLoginPage() {
let loginViewController = LoginViewController()
navigationController?.pushViewController(loginViewController, animated: true)
}
...
}
class LoginViewController: UIViewController {
...
@IBAction func signUpButtonTapped(sender: UIButton) {
let viewController = RegisterViewController()
self.navigationController?.pushViewController(viewController, animated: true)
}
func backToPreviousScreen() {
self.navigationController?.popViewControllerAnimated(true)
}
...
}
internal class RegisterViewController: UIViewController {
...
@IBAction func pushLoginPage(sender: AnyObject) {
let viewController = LoginViewController()
self.navigationController?.pushViewController(viewController, animated: true)
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment