I want to use MutableArray for any method i was announce on the top with following code
@implementation STARTTRIP_1
NSMutableArray *path = [NSMutableArray array];
...
but it's was error "Initializer element is not a compile-time constant"
I want to use this array for contain all string.
- (void)motionDetector:(SOMotionDetector *)motionDetector locationChanged:(CLLocation *)location
...
if (numberFormatter == nil) {
numberFormatter = [[NSNumberFormatter alloc] init];
numberFormatter.numberStyle = NSNumberFormatterDecimalStyle;
numberFormatter.maximumFractionDigits = 6;
}
NSString *string = [NSString stringWithFormat:@"{%@, %@}",
[numberFormatter stringFromNumber:[NSNumber numberWithDouble:coordinate.latitude]],
[numberFormatter stringFromNumber:[NSNumber numberWithDouble:coordinate.longitude]]];
[path addObject:string]; //HERE
NSLog(@"%@",path);
...