Using the same procedure, do the same for the bottom-most Label control (the one which has no visible text) and drop it right under the just created Outlet for the Text Field control. Name the Label’s Outlet
You should now have the following Outlet references added to your code:
@IBOutlet weak var textField: UITextField!
@IBOutlet weak var amendedText: UILabel!
Note: exclamation mark syntax
You may have noticed the exclamation mark at the end of the ‘optional variable’ declarations. An optional variable means: it either has a value, or none at all. It can freely change between having a value or not. An optional variable is suffixed with a question mark:
var optionalVar: String? = "Value is set"
optionalVar = nil //made empty, does not contain any value anymore
However, if you add an exclamation mark, it indicates the optional variable does not have a value yet, but will be set immediately. Also, once set, it will always have a value (in your case, a label or text field).
var optionalVar: String! // no value yet
optionalVar = "Some value" // assigned a value
print(optionalVar) // no need to check for nil
The compiler therefore does not need to check and unwrap the variable every time it is being accessed.
An optional variable with an exclamation mark is also called an Implicitly Unwrapped Optional
More information about the Swift language can be found at https://developer.apple.com/swift/