The third lecture starts with a review of the last lectures followed by an introduction to data structures in Objective-C. Numbers are represented as int, float, double, NSNumber, booleans as BOOL, Strings as NSString and NSMutableString, dates as NSDate, and binary data as NSData. Further primitives are NSIndex and NSValue.
As collections there are arrays represented as NSArray and NSMutableArray, sets as NSSet and NSMutableSet, and dictionaries as NSDictionary and NSMutableDictionary.
In addition there are blocks for executable code.
Foundation classes are by default immutable which has the advantage of having no unwanted side-effects when passing objects to methods. To be changeable after initialization they have to be defined as Mutable.
Continue reading “iOS Dev – Lecture #3: Foundation Classes”