Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to lock Orientation for a particular screen in ios in react native

import Orientation from 'react-native-orientation-locker';

useEffect(()=>{
   Orientation.lockToPortrait(); //this will lock the view to Portrait
   Orientation.lockToLandscape(); //this will lock the view to Landscape
})
 
PREVIOUS NEXT
Tagged: #How #lock #Orientation #screen #ios #react #native
ADD COMMENT
Topic
Name
7+2 =