Autorotation and Autosizing. Chapter 5 o the iOS5 Begginer guide.