0
|UITableView子視圖上的UISwipeGestureRecognizer
---- self.view
|
-------- UIView (A)
|
------------ UITableView
|
---------------- UIView (B)
|
我這個層次上UIView
(B)加入UISwipeGestureRecognizer
,我已經給了滑動手勢四個方向,但它只能檢測左右方向,當我試圖進行上下側刷卡UITableView
滾動條,我應該怎麼做才能識別滑動而不是滾動表格?
我做了以下(個別)後谷歌搜索,但它不會工作。
swipeUp.cancelsTouchesInView = NO; //swipeUp is UISwipeGestureRecognizer
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}
我不能禁用/啓用表格滾動,因爲還有其他視圖可以顯示。
好招!但我不能那樣做,因爲我在桌上有其他觀點。 – Hemang
@hemang >>看我的編輯 – Rashad