Clang 3.1 and Apple's LLVM 4.0 introduced new literal syntax for object creation and collection indexing in Objective-C, allowing simpler use of NSNumber, NSArray and NSDictionary.
I was going through the release notes for Xcode 4.4 and noticed this: LLVM 4.0 Compiler Xcode now includes the Apple LLVM …
objective-c xcode objective-c-literalsIt's always been possible to create NSArrays (and NSDictionaries/NSNumber) with vararg method calls, like: [NSArray arrayWithObjects: @"a", @"b", @"c", …
objective-c llvm clang objective-c-literalsI'm creating a custom navigation bar class and customizing it's title attributes using the following code: self.titleTextAttributes = @{ UITextAttributeFont: bariol, …
objective-c objective-c-literalsI know I can create an NSArray with @[@"foo", @"bar"] or an NSDictionary with @{@0 : @"foo", @1 : @"bar"}. Is there a literal …
objective-c cocoa nsmutablearray nsmutabledictionary objective-c-literalsI wrote this simple code to try out the new Objective-C literal syntax for NSArrays: NSArray *array = @[@"foo"]; NSLog(@"%@", array[0]); …
objective-c cocoa compiler-errors nsarray objective-c-literalsPossible Duplicate: Should I prefer to use literal syntax or constructors for creating dictionaries and arrays? Is there any difference …
objective-c nsarray objective-c-literalsIn Objective-c what is the difference between @YES/@NO and YES/NO? What types are used for each?
objective-c boolean objective-c-literalsI have just realised that I can access NSDictionary using both objectForKey: and dict[key]? NSDictionary *coordsDict = @{@"xpos": @5.0, @"ypos": @7.2, @"zpos": @15.7}; …
objective-c nsdictionary objective-c-literals