Now i am working in simple iphone application, i have stored some value in NSMutableArray
like "{54.399, 196}","{-268.246, 273}".
so i want to get 54.399 in first indexpath
, how to get this, please help me
Thanks in Advance
It seems you have an Array of Arrays, so it would be:
[[myArray objectAtIndex:0] objectAtIndex:0];
Or using subscripting:
myArray[0][0];
Edit:
Ok you have an Array of NSStrings
. To do what you want (get the 53.399) do the following:
NSString *myString = [myArray objectAtIndex:0];
NSArray *stringComponents = [myString componentsSeparatedByString:@","];
NSString *myFinalString = [stringComponents objectAtIndex:0];
With subscripting:
NSString *myFinalString = [[myArray[0] componentsSeparatedByString:@","][0];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With