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.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
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.
the only way i can think of is thru GPS. the accelerometer is out. but im not sure if enough information is provided thru "GPS API".