Search code examples
iosrotationuiwindow

iOS subviews of window not rotating


I have a number of subviews on the main window. These subviews do not rotate. Is there an easy way to fix this problem?


Solution

  • Use UIViewController, it handles rotation automatically. There's rarely the need for adding subviews directly to the window.