$ npm install react-native-show-case --save
$ react-native link react-native-show-case
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-show-caseand addRNShowCase.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNShowCase.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNShowCasePackage;to the imports at the top of the file - Add
new RNShowCasePackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-show-case' project(':react-native-show-case').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-show-case/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-show-case')
import{View,Text,findNodeHandle,}from'react-native';importRNShowCasefrom'react-native-show-case';
...
componentDidMount=()=>{setTimeout(()=>{consthandleId=findNodeHandle(this.superRef);RNShowCase.show(handleId,'Title','Description yea!!!');},100);}...render=()=>{return(<Viewstyle={...}><Textref={r=>{this.superRef=r}}> Show showcase here </Text></View>)}- Listeners
onCasePresented,onCaseDismissed
This project is just a wraper for https://github.com/rahuliyer95/iShowcase and https://github.com/mreram/ShowCaseView
License RNShowCase is available under the MIT license. See the LICENSE file for more info.
