User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







objective-c:foundation.framework:nsnumber.h:initwithint
click
to support this page (eg 0,42 € or so) Thanks.

initWithInt

 
- (id)initWithInt:(int)value;

ObjC Sourcecode Example

    int myInt = 30;
 
    //******************** Initializing NSNumber Object *************************
 
    //** NSNumbers need to be released, if you`re not working with ARC! **
 
    NSNumber *myIntNumber = [[NSNumber alloc]initWithInt:myInt];
 
    NSLog(@"myIntNumber: %@", myIntNumber);
 

Output for this example code

2012-05-20 19:26:47.830 NSNumberSample[818:f803] myIntNumber: 30
advertising
objective-c/foundation.framework/nsnumber.h/initwithint.txt · Last modified: 2012/12/20 12:24 (external edit)

Impressum