React Native ios picker is always open

后端 未结 8 704
天涯浪人
天涯浪人 2020-12-30 18:45

I have two pickers on my screen. Whenever I navigate to the screen in iOS app I find that the pickers are always open and all options are visible.

It works

8条回答
  •  無奈伤痛
    2020-12-30 19:36

    That's just how the iOS UIPickerView component works - there's no way to customize it.

    If you want a different kind of UI element, you'll need to write your own, or use one of the many open source libraries, such as:

    • react-native-dropdown
    • react-native-modal-dropdown
    • react-native-modal-picker

    Googling with these, and similar keywords, yields many other libraries as well.

提交回复
热议问题