User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







objective-c:foundation.framework:nsnumber.h:initwithinteger

initWithInteger

 
- (id)initWithInteger:(NSInteger)value NS_AVAILABLE(10_5, 2_0);

ObjC Sourcecode Example

    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);
 

Output for this example code

2012-08-31 22:37:05.699 NSNumberSample[808:f803] myIntegerNumber: 20
advertising
objective-c/foundation.framework/nsnumber.h/initwithinteger.txt · Last modified: 2012/12/20 12:24 (external edit)

Impressum Datenschutz