Forward vertical scrolls from UIScrollView to a sibling UITableView

后端 未结 2 1957
北荒
北荒 2021-02-13 14:22

I have a view controller with this hierarchy:

View Controller:

  • UIScrollView (scrollable horizontally)
  • UITableView (scrollable vertically)
2条回答
  •  孤街浪徒
    2021-02-13 14:38

    This will make your scroll simultaneously with UITableView and UIScrollView and apply @Stephen Johnson's block

     - (BOOL)gestureRecognizer:(UIPanGestureRecognizer *)gestureRecognizer
     shouldRecognizeSimultaneouslyWithGestureRecognizer:(UISwipeGestureRecognizer *)otherGestureRecognizer
     {
         return YES;
     }
    

提交回复
热议问题