react-native-photo-viewer
React native photo viewer component for Android, iOS
Table of contents
Install
npm install react-native-photo-viewer --save
Use rnpm to automatically complete the installation:
rnpm link react-native-photo-viewer
or link manually like so:
Android
// file: android/settings.gradle... include ':react-native-photo-viewer'project(':react-native-photo-viewer').projectDir = new File(settingsDir, '../node_modules/react-native-photo-viewer/android')
// file: android/app/build.gradle... dependencies { ... compile project(':react-native-photo-viewer')}
// file: android/app/src/main/java/com/<...>/MainApplication.java ... ; // <-- add this import
Usage
Android
var PhotoViewerManager = ; /** * The method will launch native module * @param */PhotoViewerManager;
iOS
var PhotoViewer = ; /** * This component will be used as Control, embeded inside a Viewer */ <PhotoView source=uri: URL minimumZoomScale=1 // min scale maximumZoomScale=4 // max scale .../>