How to handle autorotation in iOS 6 and iOS 7