react-native-actionsheet-picker
A wrapper on top of ActionSheetPicker-3.0 for displaying string picker in an actionsheet
Installation
npm i --save react-native-actionsheet-picker
You need CocoaPods to install ActionSheetPicker-3.0
.
To integrate ActionSheetPicker-3.0 into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'ActionSheetPicker-3.0'
Then, run the following command:
$ pod install
Add it to your iOS project
- Run
npm install react-native-actionsheet-picker --save
- Open your project in XCode, right click on
Libraries
and clickAdd Files to "Your Project Name"
(Screenshot) then (Screenshot). - Add
libCJActionSheetPicker.a
toBuild Phases -> Link Binary With Libraries
(Screenshot). - Whenever you want to use it within React code now you can:
var CountDownPicker = require('NativeModules').CJActionSheetPicker;
ActionSheetPicker
Example var ActionSheetPicker = CJActionSheetPicker; var ExampleApp = React;
ActionSheetPicker
with multiple selection
Example This depends on this PR, you can use it now by changing your Podfile
to:
pod 'ActionSheetPicker-3.0', :git => 'https://github.com/oblador/ActionSheetPicker-3.0.git', :branch => 'feature/multiple-selection'
; ;
CountDownPicker
Example var CountDownPicker = CJCountDownPicker; var ExampleApp = React;