React Native ios picker is always open

后端 未结 8 664
天涯浪人
天涯浪人 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.

    0 讨论(0)
  • 2020-12-30 19:38

    import from native-base library instead of react-native

    0 讨论(0)
提交回复
热议问题