So I have been working on a problem with UIView on the iPad. Essentially I have a splitview as the root view and I want to overlay my custom image view over top 开发者_JAVA技巧of the splitview (This is because the splitview must be the root view). The problem that I have, is when I call addSubview on my splitview the subview gets displayed in its default orientation, with no regard to the iPad's current orientation. Any suggestions on what I am doing wrong or flag I am not setting?
Thanks!
Code that I am using to add the view:
[splitViewController.view addSubview: myImageController.view];
Example screenshots: http://www.engineering.uiowa.edu/~krtaylor/so/
So if figured out a solution and that is to programmatically create the view and use UIDevice's currentOrientation to size the view properly.
I had the same problem, seams resolved by removing from the parent view the "autoresize subview" option in IB.
Select the view a then: Inspector -> Attributes (first tab) -> drawing.
精彩评论