Tutorial by Examples

Modern Objective C provides ways to reduce amount of code you need to initialize some common types. This new way is very similar to how NSString objects are initialized with constant strings. NSNumber Old way: NSNumber *number = [NSNumber numberWithInt:25]; Modern way: NSNumber *number = @25;...
In modern Objective C syntax you can get values from NSArray and NSDictionary containers using container subscripting. Old way: NSObject *object1 = [array objectAtIndex:1]; NSObject *object2 = [dictionary objectForKey:@"Value"]; Modern way: NSObject *object1 = array[1]; NSObject *o...

Page 1 of 1