I can't get didAccelerate to trigger开发者_运维百科. I have the delegate implemented in my header file. I've set a breakpoint in the method:
- (void) accelerometer: (UIAccelerometer *)accelerometer didAccelerate: (UIAcceleration *)acceleration {
int i = 0;
}
I've tried it with two different apps but still nothing. Any ideas on what I'm doing wrong?
try to set accelerometer's delegate to self. BTW, did you try to check it on a real device?
精彩评论