How to prevent the screen from rotating on the iPhone.
On the iPad: If you own an iPad you know already know how great it is to be able to use all of that screen real estate in both portrait and landscape orientations. There are some times, however, that call for keeping the screen in one orientation and Apple kindly included included a switch on the iPad’s side that can control this feature. If you prefer to keep that switch for enabling silent mode you can still prevent the rotation in the iPad settings.
On the iPhone: on the iPhone, this feature seems to be missing. Looking through the settings gets you nowhere.
Well, in fact you can prevent rotation, and it’s super easy! The trick is, it’s hidden in the App tray.
Double tap the home button to show the active apps and then swipe to reveal the panel on the left. Tap the silver icon to toggle the screen lock on and off.