danielebogo/DBCamera — pull request #78 by lekksi (2014-08-05 14:34:03+00:00)
Title: Fixes for DbMotionManager

Fixed incorrect typedef for `DBMotionManagerRotationHandler` block (missed parameter type).

Showing the DBCamera caused the app always to crash when accelometer is not available (i.e. on simulator). If accelometer is not available `DBMotionHandler`'s `init` calls `[self deviceOrientationDidChangeTo:UIDeviceOrientationLandscapeRight]` which then tries to call a block which is null at this point. This was fixed by adding a check that `motionRotationHandler` block is set before trying to call it.

Also, the order of calls for `DBMotionManager` in `DBCameraViewController`'s `viewDidAppear` was changed so that the `motionRotationHandler` is being set before `startMotionHandler` is called.