开发者

UIAccelerometer unrecognized selector sent to instance

开发者 https://www.devze.com 2023-03-01 07:03 出处:网络
Does anyone get -[UIAccelerometer bytes]: unrecognized selector sent to instance 0x1a23f0 I do init the accelerometer:

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

精彩评论

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