Created
October 10, 2017 02:56
-
-
Save omayib/302e0e023ab50e944965a18c2ef80f6e to your computer and use it in GitHub Desktop.
here is a place to control the view state.
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
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