Unified Contacts

07 March, 2014

Simple way to create NSString & NSArray

There are several ways available to create NSString & NSArray, but sometimes you may think those methods are too long that decreases the readability of your code. Here are 2 simple ways to create NSString and NSArray.

NSString *string1 = @"string1";
NSString *string2 = @"string2";
NSArray *array = @[string1, string2];