iOS 7.1 UITapGesture not working with UIPickerView

后端 未结 5 790
野趣味
野趣味 2020-12-03 03:00

We are using a UIPickerView to allow a user to select from a list of options. We are adding UIPickerView as a subview of a container UIView. We a

5条回答
  •  执念已碎
    2020-12-03 03:25

    Try This Sol:

    Set gestureRecognizer as true to detect in all ios versions

    Step 1: Add UIGestureRecognizerDelegate

    Step 2: Add folloeing code into to your class file

    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
    {
        // return
        return true;
    }
    

提交回复
热议问题