Finding Direction in iPhone like in Compass?

此生再无相见时 提交于 2019-12-03 11:32:53
akshayk80

here is a sample code link from apple.com for using magnetometer and Core Location https://developer.apple.com/library/ios/#samplecode/Teslameter/Introduction/Intro.html

you need to be logged in, in case you cant find the page, just look for Teslameter example in Sample Code section of https://developer.apple.com

Here i have given you the simple PDF to get an overview about the Magnetometer, CLLocation and accelerometer functions. make a look about this.,

http://learningiphoneprogramming.com/pdf/The_Sensors_in_your_iPhone.pdf

Taimur Ajmal

You can get lot of help from this link http://answers.oreilly.com/topic/1657-how-to-use-the-iphones-digital-compass/

also if you want to search it in Apple look for CLLLocationManager and UIAcelerometer. You will find the code hopefully.

Taimur.

The iPhone 3GS has a magnetometer for detecting magnetic position, the 3G doesn't so you won't be able to do it on a 3G

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!