开发者

UIAccelerometer unrecognized selector sent to instance

Does anyone get

-[UIAccelerometer bytes]: unrecognized selector sent to instance 0x1a23f0

I do init the accelerometer:

UIAccelerometer *accel = [UIAccelerome开发者_如何学JAVAter sharedAccelerometer];
accel.updateInterval = 1.0f/30.0f;
accel.delegate = self;

The reason I am asking is that on some devices the app works, and on others just crashes. And I am not sure what is the reason.

Thanks!


This sounds as if you send the accelerometer a bytes message, which it doesn't implement. The code you show doesn't have a problem, maybe do search for bytes and double-check that usage.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜