Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

For my application I want to calculate my car/bike speed using iphone. How can i do that? Ideally, it should run continuously in the background.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
499 views
Welcome To Ask or Share your Answers For Others

1 Answer

CLLocation includes a speed property that will give you the current speed of the device. (Note the comment about the accuracy at that link.)

To get the user's current location, follow the steps in the Location Awareness Programming Guide, under "Getting the User's Current Location".

Finally, to enable location updates in the background, see Receiving Location Events in the Background in the iOS Application Programming Guide.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...