i ma adding value in an array by using this syntax
[Listoflatlong addObject: sObject.startLocLat];
but it is giving error that is error: incompatible type for argument 1 of addObject:. I am adding double value of sObject.startLocLat in array Listoflatlong. How remove this error?
If you are working with a numerical primitive, you should add an
NSNumberobject to anNSMutableArray, e.g. to add adouble, use the+numberWithDouble:class method:As a matter of Objective-C convention, you should name your mutable array instance uncapitalized, i.e.
listOfLatLong. Classes get capitalized. Instance variables do not (should not).