使用“ECSlidingViewController”从屏幕的特定部分实施滑动操作
问题描述:
我有ECSlidingViewController完美工作,但我希望以这样的方式实现它,当用户尝试滑动操作时不会执行用户尝试从标题部分。使用“ECSlidingViewController”从屏幕的特定部分实施滑动操作
我只需要程序的主体部分向刷卡gecture
答
响应,这是我做到了。 locationRect和locationrect2是您希望手势启用的部分。
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
CGRect locationRect;
CGRect locationRect2;
locationRect = CGRectMake(0, 0,60, self.view.frame.size.height);
locationRect2 = CGRectMake(self.view.frame.size.width-60, 0,60,self.view.frame.size.height);
CGPoint p = [gestureRecognizer locationInView:self.view];
if (CGRectContainsPoint(locationRect, p) || CGRectContainsPoint(locationRect2, p)) {
return YES;
} else {
return NO;
}
}
感谢您的答复。我们已经从这个项目中走了很长一段路,但是我会尝试实现并标记为已回答,如果它有效的话。非常感谢:) –
您的欢迎:) –