Discussion Forums  >  Uncategorized

Replies: 1    Views: 229

tom70154
I hate code!
Profile
Posts: 19
Reg: Dec 18, 2011
location unknow...
190
12/25/11 11:44 AM (14 years ago)

Use the compass on iPhone

Hi Want to use the compass on the iPhone to incorporate in my app, is there a easy way of doing this?? Thanks
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
12/26/11 05:15 PM (14 years ago)
Hi tom70154, The easiest way to do this is to just ask the users to use the compass as most folks using an iphone today are pretty comfortable with switching between applications. But, I can understand why you would want users to not have to leave your app. Otherwise as far as I can tell you'll need to do some custom coding in xcode. Here is a bit of the documentation on the compass. https://developer.apple.com/library/safari/#documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html#//apple_ref/javascript/instp/DeviceOrientationEvent/webkitCompassHeading
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.