Converting float to NSNumber
The method floatValue
of NSNumber
does not take parameters. If you would like to set a new float number, you need to re-assign testNSNumber
, because NSNumber
does not have a mutable counterpart:
testNSNumber = @(myfloatvalue); // The new syntax
or
testNSNumber = [NSNumber numberWithFloat: myfloatvalue]; // The old syntax