Nothing is more annoying then having your iPhone or iPad screen's orientation flip back and forth between portrait and landscape mode when you don't want it too.
Here's how to lock your iPhone or iPad screen orientation. Keep in mind that not all apps are designed to rotate.
How to Turn on Portrait Orientation Lock on Your iPhone
You can lock the screen orientation on your iPhone quickly and easily in Control Center. Swipe up from the bottom of your screen to open Control Center and tap on the Portrait Orientation Lock icon. Your phone's orientation will now stay locked in portrait mode until you turn Portrait Orientation Lock off. There is no option for locking your iPhone screen in landscape mode.
How to Turn on Lock Rotation on Your iPad
You can set the side switch to lock and unlock your iPad's screen orientation. Go to Settings>General and select Lock Rotation under Use Side Switch To. You can now use the side switch to lock your iPad in portrait or landscape mode.