开发者

running location services while browsing the app

So I have two view controllers in my iphone project - one of them collects user location data and saves to a file continuously, and the other one does something else (doesnt really matter). I would like to keep the location updates running once the user flips to the other view controller since I am logging and saving to a file his location. How can I k开发者_开发技巧eep running the location updates and file savings while on other view controllers (even if I had more than 2 view controllers total)?

Thanks!


Create an instance of CLLocationManager and start monitoring for location changes (or significant location changes if that works for you). You can create this instance in your AppDelegate or some other class that is unrelated to the view controllers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜