Created
October 7, 2018 23:47
-
-
Save shiningabdul/599fb83c33b927088caf7786a8c3b86a to your computer and use it in GitHub Desktop.
Starting view controller content
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 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