我正在为我公司的AR应用程序工作,并且它工作正常,除了十个设备中的大约一个。 (所有的iPhone 4和4S,5.1.1+)CMMotionManager不生产任何.deviceMotions
当我们运行这段代码:
CMDeviceMotion *d = motionManager.deviceMotion;
if (d == nil && motionManager.deviceMotionActive && motionManager != nil) {
DLog(@"Device motion is active, but no device motion recieved");
}
我们对一些获得的“设备运动是积极的,但没有设备运动收到”固体块这些设备,但它似乎完全随机。
如果motionManager.deviceMotionActive
为真,且存在运动管理器,则.deviceMotion应返回CMDeviceMotion。但它只是返回零。
有没有人有一个想法可能会导致这种情况?该检查是在我
- (void)onDisplayLink:(id)sender
在iphone 4和4s中都可以找到bug的设备。 –
您是否尝试过检查对象内存分配/释放。可能会有问题。另请查看此链接:http://iphonedevsdk.com/forum/iphone-sdk-development/103541-cmdevicemotion-flick-gesture.html – iCreative
使用基于块的方法时,您是否遇到同样的问题? – Jonathan