User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







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

initWithFloat

- (id)initWithFloat:(float)value;

ObjC Sourcecode Example

    float myFloat = 1.123456f;
 
    //******************** Initializing NSNumber Object *************************
 
    //** NSNumbers need to be released, if you`re not working with ARC! **
 
    NSNumber *myFloatNumber = [[NSNumber alloc]initWithFloat:myFloat];
 
    NSLog(@"myFloatNumber:%@", myFloatNumber);
 

Output for this example code

2012-05-20 19:26:47.832 NSNumberSample[818:f803] myFloatNumber:1.123456
advertising
objective-c/foundation.framework/nsnumber.h/initwithfloat.txt · Last modified: 2012/12/20 12:24 (external edit)

Impressum Datenschutz