Search code examples
iphoneios4nsmutablearray

How to get the nsmutablearray data into float


getting dataset as like below

Webservices *details=[[Webservices alloc] init];
[details getMobileNumberDetails:phnotextfield.text];    
NSLog(@"longitudes Arrays from %@",details.resultData);

"-91.57696007", "10.343234", "74.982343", "76.464844", "76.464844",

But how to convert total dataset into float on iOS?


If we use OjectAtIndex:0 it takes first position but I have to store total response into single float value without using OjectAtIndex:0 in iphone.


Solution

  • use

    float x = [[Array objectAtIndex:0] floatValue];