O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Strings

The other major framework we import by default in iOS projects is Foundation, which provides fundamental data types for common concerns like dates and times, regular expressions, file I/O, and so on. We’ve already used two classes from Foundation: the NSURL and NSURLRequest that we used to populate the UIWebView.

Foundation also provides strings (as the NSString class) and collections (NSArray and NSDictionary), and in Objective-C, we would work with these as we would with any other class. However, in Swift, the language has taken more responsibility for strings and collections, and we can do a lot of common tasks without having to explicitly call methods on object instances. This makes Swift a lot easier to just get in and use.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required