Skip to content

Instantly share code, notes, and snippets.

@arifinfrds
Created September 10, 2018 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arifinfrds/bc3ebec5d2668032b914c820628756ed to your computer and use it in GitHub Desktop.
Save arifinfrds/bc3ebec5d2668032b914c820628756ed to your computer and use it in GitHub Desktop.
arifinfrds/iOS-XCUITestsDemo/XCUITestsDemo/LoginVC.swift
class LoginVC: UIViewController {
// MARK: - Outlets
@IBOutlet weak var usernameTextField: UITextField!
@IBOutlet weak var passwordTextField: UITextField!
// MARK: - View life cycle
override func viewDidLoad() {
super.viewDidLoad()
}
// MARK: - IBAction
@IBAction func didTapLoginButton() {
guard let username = usernameTextField.text, let password = passwordTextField.text else {
print("Input cannot be empty")
return
}
print("username: \(username)")
print("password: \(password)")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment