0
我有一個UIImageView,我試圖確定何時執行拖動,拖動距離原點的距離。目前,我有這樣的:確定拖動點的距離是多遠
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:touch.view];
if(CGRectContainsPoint(myimage.frame, location) == 0){
}
else
{ //user didn't tap inside image}
圖像本身不動,但一個人可以把他們的手指,在圖像上單擊並拖動他們的手指。我只是試圖確定這個距離。