I just started with Swift. So I created a simple application with a label, button and a text field. When you click the button, the app has to change the label with the text
The text of your textField is an optional value because a text field can sometimes be empty. So, use an if let to unwrap the variable and make sure it's not nil — otherwise your program could crash:
if let text: String = textField.text {
textLabel.text = text
}