Search code examples
iosipadautoresize

Detail ViewController's frame (in UISplitViewController) does not change its frame when autorotating?


I am having a bear of a time figuring out why in my Detail ViewController, it's frame is still 1024x768 even when in landscape mode?

I have enabled the usual suspects--I support all orientations, resizes subviews is checked...I have tried the flexible autoresize masks, everything that I can think of.

I log the coordinates of the Detail VC's frame in portrait, and it's height:1024, and a width of 768.

This never changes and it's perplexing to me.

There is not anything special being done here. Should this resize happen automagically?


Solution

  • I suspect that this may be for the same reason as I have outlined in this answer.

    But I think you are referring to your splitViewController's view:

    self.splitViewController.view
    

    This is the outermost view and it's frame does not change.

    As regards your detailedViewController's view

    [[self.splitViewController.viewControllers objectAtIndex:1] view]
    

    It's frame does change.

    If you are definitely referring to your detailed view controller, then you should ignore this answer...