If you want to make your iPad stop switching from portrait to landscape, just go into Settings, General and then “Use Side Switch” to set up a lock rotation. You can set this in portrait or in landscape mode depending on what your choice is. If you want your iPad screen to auto-rotate at a later time, you can choose to reset the option at any time.