I am making an iPhone app and I need it to be in portrait mode, so if the user moves the device sideways, it does not automatically rotate. How can I do this?
For those who missed it: you can use the project settings screen to fix orientations throughout the app (no need to override methods in every controller):

It's as simple as toggling the supported interface orientations. You can find by clicking on your Project in the left panel > the app target > Summary tab.