- (id)initWithInteger:(NSInteger)value NS_AVAILABLE(10_5, 2_0);
NSInteger myInteger = 20; //******************** Initializing NSNumber Object ************************* //** NSNumbers need to be released, if you`re not working with ARC! ** NSNumber *myIntegerNumber = [[NSNumber alloc]initWithInteger:myInteger]; NSLog(@"myIntegerNumber: %@", myIntegerNumber);
2012-08-31 22:37:05.699 NSNumberSample[808:f803] myIntegerNumber: 20