开发者

How to pause the current state of mapview in iPhone? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 3 years ago.

开发者_Python百科 Improve this question

I have map application in which I have four buttons for Zoom In, Zoom Out, Play/Pause and Stop buttons. when zooming button is clicked map zoom in and when zoom out button is clicked map zooms out. On clicking play/pause button the user can pause the current journey and the state of the button changes to pause and when user once again clicks on the pause button the state of the button changes to play.

On clicking stop button ,the user can end the current journey. I have done with zoomin and zoomout buttons but I am confused on how to start and stop the current journey of the user.


- (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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜