我已将以下代码放在appdelegate中,但尚未调用。有任何想法吗)?
- (void)applicationSignificantTimeChange:(UIApplication *)application
{
NSData *data =[[NSUserDefaults standardUserDefaults] objectForKey:@"walking_coordinate"];
NSMutableArray *walking_array = [NSKeyedUnarchiver unarchiveObjectWithData:data];
NSData *data1 =[[NSUserDefaults standardUserDefaults] objectForKey:@"driving_coordinate"];
NSMutableArray *driving_array = [NSKeyedUnarchiver unarchiveObjectWithData:data1];
NSData *data2 =[[NSUserDefaults standardUserDefaults] objectForKey:@"biking_coordinate"];
NSMutableArray *biking_array = [NSKeyedUnarchiver unarchiveObjectWithData:data2];
[walking_array removeAllObjects];
[driving_array removeAllObjects];
[biking_array removeAllObjects];
}