New Objective-C Literals
NSArray:
NSInteger _appid = 12345;
NSArray *array = @[ @"title", @(_appid)];
NSString *title = array[0];
array[0] = @"newTitle";
NSDictionary:
NSDictionary *dict = @{
@"appid" : @(_appid),
@"title" : _title,
};
NSString *title = dict[@"title"];
dict[@"title"] = @"newTitle";
NSNumber:
NSNumber *intNum = @123;
NSNumber *floatNum = @1.23f;
NSNumber *boolNum = @YES;
More: Objective-C Literals
Was this page helpful?