April 2017
Intermediate to advanced
316 pages
9h 33m
English
We can define implicitly-unwrapped Optionals by appending an exclamation mark (!) to the end of the type. These types of Optionals will unwrap themselves.
The following example presents two ways to get a value from a dictionary. In the first example, the resulting value will be an optional so should be unwrapped. The second example will implicitly unwrap the value:

Like forcefully unwrapping, implicitly-unwrapped Optionals may cause runtime crashes in our applications, so we need to be cautious when we use them.
Read now
Unlock full access