简体   繁体   中英

UIPanGestureRecognizer + UIViewController

I am adding a UIPanGestureRecognizer to a partially hidden UIViewController (it is there to pull it back on screen). All is working fine except on the odd occasion when the UIViewController has a scrollable subView (ie UIScrollView , UITableView ). I can't set useInteractionEnabled = NO because this disables my gesture... Any suggested workarounds?

EDIT:

I have this work around and it is achieving what I want...

for(UIView *subView in sender.view.subviews) {

    [subView setUserInteractionEnabled:NO];
}

But I feel there should be a better solution?

The best I have come up with is

for(UIView *subView in sender.view.subviews) {

    [subView setUserInteractionEnabled:NO];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM