一个 React Native 库,提供从 iOS 渲染 UISegmentedControl 的组件。
它就像一个花哨的单选按钮,或者用苹果的话来说:"由多个段组成的水平控件,每个段充当一个独立的按钮"(source)。该组件在 iOS 上渲染为 UISegmentedControl
,并在 Android 和 Web 上忠实地再现该控件(因为这些平台的标准库上不存在等效项)。
¥It's like a fancy radio button, or in Apple's words: "A horizontal control that consists of multiple segments, each segment functioning as a discrete button" (source). This component renders to a UISegmentedControl
on iOS, and to faithful recreations of that control on Android and web (because no equivalent exists on those platforms' standard libraries).
¥Installation
-
npx expo install @react-native-segmented-control/segmented-control
If you're installing this in a bare React Native app, you should also follow these additional installation instructions.
¥Usage
请参阅 react-native-community/segmented-control
处的完整文档。
¥See full documentation at react-native-community/segmented-control
.