Closed difoi closed 4 years ago
- (BOOL)shouldRespondToPanModalGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecognizer {
CGPoint loc = [panGestureRecognizer locationInView:self.view];
return !CGRectContainsPoint(self.datePicker.frame, loc);
}
重写该方法,判断panGestureRecognizer location是否在dataPicker中。
非常感谢,重写 shouldRespond 就可以了
非常棒,解决了我的问题。作者大大真厉害!
使用UITableView 滑动没有问题。 但是使用UIDatePicker,弹出和显示都没有问题;向下滑动时间选择时,会自动下滑关闭窗口,请问怎么解决???
override func panScrollable() -> UIScrollView? { return nil }