Skip to content

Instantly share code, notes, and snippets.

@shiningabdul
Created October 7, 2018 23:47
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 shiningabdul/599fb83c33b927088caf7786a8c3b86a to your computer and use it in GitHub Desktop.
Save shiningabdul/599fb83c33b927088caf7786a8c3b86a to your computer and use it in GitHub Desktop.
Starting view controller content
class ViewController: UIViewController {
@IBOutlet weak var messageLabel: UILabel!
@IBOutlet weak var messageField: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
@IBAction func showButtonTapped(_ sender: Any) {
guard let newMessage = messageField.text else {
return
}
messageLabel.text = newMessage
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment