1.0.0 • Published 7 years ago
react-native-sclalert-wrapper v1.0.0
react-native-sclalert-wrapper
This is wrapper library for SCLAlertView. You can use native beautiful alert in ReactNative projects.
Getting started
$ npm install react-native-sclalert-wrapper --save
$ yarn add react-native-sclalert-wrapper
Mostly automatic installation
$ react-native link react-native-sclalert-wrapper
It is not working for this project.
Manual installation
iOS
- You need pod install. pod 'SCLAlertView-Objective-C'
- In xcworkspace., in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-sclalert-wrapper
and addRNSclalertWrapper.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNSclalertWrapper.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)
Usage
import RNSclalertWrapper from 'react-native-sclalert-wrapper'
RNSclalertWrapper.showSCLAlertWithThreeButtons("success","失敗","ダメです","必要","不要","閉じる",
function(callback) {
console.log('In Callback', callbacl)
}
)
-(void)showAlert:(SCLAlertView *)alert
ctrl:(UIViewController *)ctrl
title:(NSString *)title
subTitle:(NSString *)subTitle
type:(NSString *)type
1.0.0
7 years ago