I have been reading stackOverflow answers for this question for hours. Please help me.
I am displaying a view using addSubview. All of my UIView objects are loaded via xib files. The hierarchy is MainWindow.xib -> View1.xib -> View2.xib. Each has a controller, which loads the xibs via initWithNibName: bundle:. Each View in the hierarchy has the Autoresize Subviews property checked in IB. Each one has their Autosizing options checked as well. (a.k.a. Little red arrows.)
View2 is added as a subview to View1, using addSubview, when a button on View1 is clicked. This works fine on the iPhone.
I am now making my app work w/ the iPad. All my other views work fine and resize correctly. But View2 does not. Is this because it doesn’t get added to View1 until after it calls the resize functions? If so, how do I trigger the autoresize functionality? What am I missing?
I am sorry if this is not detailed enough. I’d be happy to respond to debugging questions as well. After two days of searching, I still simply feel a little lost.
Where is the code that adds View2 to View1? You probably want to do something like