Reputation: 4920
An other way please.
I have an array whole elements are doubles. How can I get the content out as double?e.g.
coordinate.latitude = [coords objectAtIndex:0];// value inside it is 61.2180556;
Upvotes: 0
Views: 205
Reputation: 46027
You can't store primitive doubles in NSArray. You have either stored them as NSNumber or NSString. In either case use:
coordinate.latitude = [[coords objectAtIndex:0] doubleValue];
Upvotes: 2