에 myView
이라는 UIView가 있습니다. 나는 UIGestureRecognizer를 swipeLeft
(아래 코드)이라고 부르며, 사용자가 왼쪽으로 쓸어 넘는 것을 감지합니다.제스처 인식기를 하나의 특정 UIView로 제한 하시겠습니까?
문제는 다음과 같습니다. myViewController
은 전체 화면에서 동일한 제스처를 인식하고 다른 작업을 수행합니다. 그래서 내 swipeLeft
myViewController
의 해당 특정 영역에서 myView
때 수행 할 내 응용 프로그램을 싶습니다.
UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self
action:@selector(myMethod:)];
swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft;
swipeLeft.delaysTouchesBegan = YES;
[self.myView addGestureRecognizer:swipeLeft];
자세한 내용 : 나는 RESideMenu 및 myViewController
를 사용하고 오른쪽 메뉴, 그래서 그것을 볼 때, myViewController
의 전경은 모든 방향으로 스 와이프를 인식합니다. 이 UIView myView
에서 인식자를 변경하고 싶습니다.
감사합니다.
http://stackoverflow.com/questions/17489780/exclude-subview-from-uitapgesturerecognizer? – Larme