react-native-wgg-qrcode
v1.0.2
Published
A pdf file view component for react native.
Downloads
1
Readme
react-native-zsan-qrcode
说明
Getting started
$ npm install react-native-zsan-qrcode --save
$ react-native link react-native-zsan-qrcode
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-zsan-qrcode
and addQRCode.xcodeproj
- In XCode, in the project navigator, select your project. Add
libQRCode.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.qrcode.QRCodePackage;
to the imports at the top of the file - Add
new QRCodePackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-zsan-qrcode' project(':react-native-zsan-qrcode').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zsan-qrcode/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-zsan-qrcode')
Usage
import { QRCodeView } from 'react-native-zsan-qrcode';
<QRCodeView
style={styles.qrCode}
size={200}
text={'1453463656456'}
forecolor={'black'}
backcolor={'white'}
/>