Created
          April 8, 2019 05:00 
        
      - 
      
 - 
        
Save LiewJunTung/f0fd17cbae25ec40ccccd2f202943309 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 | |
| import app | |
| class ViewController: UIViewController, LoginView { | |
| var presenter: LoginPresenter? = nil | |
| @IBOutlet weak var textView: UILabel! | |
| @IBOutlet weak var editText: UITextField! | |
| @IBAction func clickSubmitButton(_ sender: Any) { | |
| presenter?.processLogin(password: editText.text ?? "") | |
| } | |
| func loginResult(result: Bool) { | |
| if (result){ | |
| textView.text = "Login Successful" | |
| } else { | |
| textView.text = "Login Failed" | |
| } | |
| } | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| presenter = LoginPresenterImpl(loginView: self) | |
| } | |
| override func didReceiveMemoryWarning() { | |
| super.didReceiveMemoryWarning() | |
| } | |
| @IBOutlet weak var label: UILabel! | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment