我不能工作了停在我的Cocos2D遊戲陀螺更新,停止陀螺更新
我已經得到了我的init下面的代碼:`//陀螺 MotionManager中= [[CMMotionManager的alloc]初始化] referenceAttitude = nil;
[motionManager startGyroUpdates];
timer = [NSTimer scheduledTimerWithTimeInterval:0.2
target:self
selector:@selector(doGyroUpdate)
userInfo:nil
repeats:YES];
然後在陀螺儀進行自我更新我檢查時進度超過100%if (progress > 100) { [self pauseSchedulerAndActions]; [self stopGyroUpdates];
然後:
- (void)stopGyroUpdates{
NSLog(@"Stop gyro update");
}
,但會將檢查...所以if語句中的代碼不斷被調用。