Skip to content

Instantly share code, notes, and snippets.

@omayib
Created October 10, 2017 02:56
Show Gist options
  • Save omayib/302e0e023ab50e944965a18c2ef80f6e to your computer and use it in GitHub Desktop.
Save omayib/302e0e023ab50e944965a18c2ef80f6e to your computer and use it in GitHub Desktop.
here is a place to control the view state.
class ViewController: UIViewController {
@IBOutlet weak var emailTextField: UITextField!
@IBOutlet weak var passwordTextField: UITextField!
@IBOutlet weak var fullNameTextField: UITextField!
@IBOutlet weak var phoneNumberTextField: UITextField!
var presenter: RegistrationPresenter?
override func viewDidLoad() {
super.viewDidLoad()
self.presenter = RegistrationPresenter(delegate: self)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
@IBAction func buttonRegisterDidTap(_ sender: Any) {
self.presenter?.register(email: emailTextField.text!, password: passwordTextField.text!, fullName: fullNameTextField.text!, phoneNumber: phoneNumberTextField.text!)
}
}
extension ViewController: RegistrationDelegate{
func showProgress(){
}
func hideProgress(){
}
func registrationDidSucceed(){
print("succeed")
}
func registrationDidFailed(message: String){
print(message)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment