August 2016
Intermediate to advanced
1027 pages
23h 11m
English
There is a second type of optional called an implicitly unwrapped optional. There are really two ways to look at what an implicitly unwrapped optional is; one way is to say that it is a normal variable that can also be nil; the other way is to say that it is an optional that you don't have to unwrap to use. The important thing to understand about them is that, similar to optionals, they can be nil, but you do not have to unwrap them like a normal variable.
You can define an implicitly unwrapped optional with an exclamation mark (!) instead of a question mark (?) after the type name:
var name: String!
Similar to regular optionals, implicitly unwrapped optionals do not need to be given an initial value because they are ...
Read now
Unlock full access