April 2015
Intermediate to advanced
556 pages
17h 47m
English
In Objective-C, a number of familiar types are implemented as classes as part of the Foundation framework: NSString, NSNumber, NSArray, NSDictionary, and NSSet. Because Cocoa was built for Objective-C, you will often run into these classes when working with the Cocoa APIs. The good news is that Apple has made transitioning between the Swift and Foundation (Objective-C) counterparts relatively painless. They are toll-free bridged, meaning that there is minimal computational cost in converting between the two.
Swift types are automatically bridged to their Foundation counterparts:
let string = "Howdy" let objcString: NSString = string
The reverse is not true, however: ...
Read now
Unlock full access