- (IBAction)pauseButtonPressed
{
if(!isPaused)
{
mapview.showsUserLocation = NO; // if you want to stop showing user location
[yourLocationManager stopUpdatingLocation];// If you use CLLocationManager to get location
isPaused = YES;
}
else
{
mapview.showsUserLocation = YES;
[yourLocationManager startUpdatingLocation];
isPaused = NO;
}
- (IBAction)pauseButtonPressed
{
if(!isPaused)
{
mapview.showsUserLocation = NO; // if you want to stop showing user location
[yourLocationManager stopUpdatingLocation];// If you use CLLocationManager to get location
isPaused = YES;
}
else
{
mapview.showsUserLocation = YES;
[yourLocationManager startUpdatingLocation];
isPaused = NO;
}
发布评论
评论(1)