Learning Swift - Optionals

from blog TrozWare, | ↗ original
Today I plan to discuss optionals since they were a feature of Swift that I found difficult to grasp at first. What is an optional in Swift? # An optional is a variable of a specified type that can also be nil. Why does this matter? # In Objective-C, any object type could be nil. If you declared a variable like this: NSString *myString;...