Tag: unwrapping otpional values
-
Tip: Deep Dive into Any? Dictionaries
In many factory methods, you’ll find parameters with type Any? like this: userInfo parameters in iOS and context in watchOS use these. You can place anything there, but most often, you’ll use a dictionary of type [String:Any]. This is a great way of moving multiple values from one method to another without making a class…
-
The Swift Swift Tutorial: Ten Points for Using Optionals.
In the first month and a half of using Swift, I could argue the optional value is the most difficult new concept. It isn’t hard, just something different to wrap one’s head around. That Apple’s documentation peppers information about optionals in two different e-books without consolidating the information doesn’t help. I decided to combine what…