Skip to content

Instantly share code, notes, and snippets.

@darkseed
Created August 20, 2011 17:21
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save darkseed/1159367 to your computer and use it in GitHub Desktop.
Check for Gyroscope
- (BOOL) isGyroscopeAvailable
{
#ifdef __IPHONE_4_0
CMMotionManager *motionManager = [[CMMotionManager alloc] init];
BOOL gyroAvailable = motionManager.gyroAvailable;
[motionManager release];
return gyroAvailable;
#else
return NO;
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment