npm install react-native-root-views --save
import { ActionSheet, Loading } from 'react-native-root-views';
// show loading
Loading.show();
// hide loading
Loading.hide();
ActionSheet.showActionSheetWithOptions(
{
options: ['拍照', '从相册选择', '取消'],
cancelButtonIndex: 2,
tintColor: '#2b3d54',
},
buttonIndex => {
// do something
},
);
Same API as ActionSheetIOS
show loading
hide loading