When testing our app, we need to test both landscape and portrait modes as both will be enabled by default. In the case of this app, we don't really need to have a landscape mode as it doesn't add any extra value to the portrait mode. Having decided this point, we need to disable the landscape mode to ensure we don't have any odd behavior in our user interface if the user orients the device as though for landscape mode. We will do this in XCode through the General tab when selecting the root of our project:
We need to uncheck both Landscape Left and Landscape Right options to allow only portrait mode in all cases. ...