Created
July 29, 2013 11:51
-
-
Save zapsleep/6103812 to your computer and use it in GitHub Desktop.
Getters for gyroscope in DVParallaxView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(CADisplayLink *)displayLink { | |
if (!_displayLink) { | |
_displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(displayLinkHandler)]; | |
} | |
return _displayLink; | |
} | |
-(CMMotionManager *)motionManager { | |
if (!_motionManager) { | |
_motionManager = [[CMMotionManager alloc] init]; | |
_motionManager.deviceMotionUpdateInterval = 0.03f; | |
} | |
return _motionManager; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment