views:

24

answers:

2

Hello,

What would be the best way to return a float Value from a UITextField ?

I`m using :

(dN being the textField)

[dN floatValue];

but it`s returning :

'UITextField' may not respond to '-floatValue' as a warning

+1  A: 

You need to have a NSString intermediate.

NSString *myString = dn.text;
float g = [myString floatValue];
thyrgle
A: 
[dN.text floatValue];
ohho
good one, thanks :)
Julz