Skip to content

A <View/> component that rotates every time the device changes orientation

License

Notifications You must be signed in to change notification settings

ProjectAperture/react-native-rotating-view

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

react-native-rotating-view

Creates a view that rotates when the device's orientation changes

Installation

npm install --save react-native-rotating-view

This package depends on react-native-orientation, please make sure you follow the instructions for manual linking.

Do not forget to add Orientation.lockToPortrait() in your initial view to lock orientation and enable the effect.

Usage

var RotatingView = require('react-native-rotating-view');

...
  <RotatingView 
    portraitStyle={{ ... }}
    landscapeRightStyle={{ ... }}
    landscapeLeftStyle={{ ... }}
  >
    <YourElement />
  </RotatingView>
...

Demo

We use react-native-rotating-view in Apperture iOS / Android

License

MIT License. © Wassim Gharbi

About

A <View/> component that rotates every time the device changes orientation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%