Return to Snippet

Revision: 64101
at July 4, 2013 21:48 by pecta

Initial Code

// First objective c style

int b = 10;
float a = [[NSNumber numberWithInt: b] floatValue]
There will be NSNumber instance and messages numberWithInt, floatValue will be send, right?

// Second c style

int b = 10;
float a = (float) b;

Initial URL

Initial Description
method to convert int to float in ObjC

Initial Title
Casting int to float

Initial Tags

Initial Language
Objective C