touchesMovedが(ほぼ)必ず呼ばれてしまう。
かる〜〜〜く素早くタッチすると呼ばれないけど。
touchesMovedをドラッグ開始みたいに考えたロジックがあったりすると、6sと6s Plusだけで誤動作します。
最近、まさにそんなバグが出ました。
シンプルな対処方法
touchesBeganで、タッチ位置を取って、
pointBegan = [[touches anyObject] locationInView:self];
touchesMovedで、移動を判断
CGPoint point = [[touches anyObject] locationInView:self]; NSInteger distX = fabs(point.x - pointBegan.x); NSInteger distY = fabs(point.y - pointBegan.y); if(( 1 >= distX ) && ( 1 >= distY ) ){ // あまり動いてない場合なにもしない return; }
fabsは絶対値。
6s, 6s Plusでは、単なるタッチな移動距離0でも呼ばれてるので、移動距離判別は必須になりますね。。