Как отловить движение UITouch?

Дело в том, что я строю элипс посредством Core Graphics. Вот часть кода. Все строится до того момента, как 2 пальца замрут на экране ( строю по координатам пальцев). Какой метод вызовется во время остановки пальцем на экране или как его выловить?

if (touches.count == 2) {
            
        NSArray *sortedTouches = [touches allObjects];
            
            if (sortedTouches.count==2) {
                
            
        UITouch *touch1 = [sortedTouches objectAtIndex:0];
        UITouch *touch2 = [sortedTouches objectAtIndex:1];
        CGPoint currentPoint1 = [touch1 locationInView:drawImage.superview];
        
        CGPoint currentPoint2 = [touch2 locationInView:drawImage.superview];
        
        CGPoint one=currentPoint1;//[touch previousLocationInView:self.drawImage];
        CGPoint two=currentPoint2;//[touch locationInView:self.drawImage];
        
              //  CGRect rectangle = CGRectMake(one.x, one.y, two.x, two.y);
        
            
                
               // CGContextAddEllipseInRect(UIGraphicsGetCurrentContext(), rectangle);
            
            sortedTouches=nil;
                
                }
        }
      else if (touches.count > 2)
      {
          drawImage.image=nil;
      
      }
        
    
    
    }
    
    
   // FirstPoint=lastPoint;
   // endPoint=currentPoint;
    
   CGContextStrokePath(UIGraphicsGetCurrentContext());
    
    drawImage.image = UIGraphicsGetImageFromCurrentImageContext();
    
    UIGraphicsEndImageContext();
  • Вопрос задан
  • 2364 просмотра
Решения вопроса 1
@maxonflic Автор вопроса
UITouchPhaseStationary
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
@mr_cloud
iOS Developer
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы