10
감지 :목적 C :이처럼 흔들림 API를 사용하고 악수
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (event.subtype == UIEventSubtypeMotionShake)
{
[img stopAnimating];
}
}
어떻게 흔들림이 중단 된 것을 감지합니까? ,
이당신은 motionBegan
또는 motionEnded
방법에 NSLog
를 추가하여 테스트 할 수 있습니다, 그리고 시뮬레이터 :
완벽한! 고마워 ... – itsame69
canBecomeFirstResponder는 의미가 있습니다. –