Reputation: 327
I have a landscape only iPad app with loaded ViewControllers whose sizes match the main ViewController of 1024x768. I noticed that, while everything displays properly, any controls set in the rightmost area of my loaded views are inactive to touch. A friend suggested I check to make sure that all of my XIB files were set to “Landscape” orientation in the Attributes inspector. Sure enough, all of my XIBs were set to “Portrait”. I went through the tedious task of setting all of my XIB files (50+) to the following settings:
Attributes Inspector - Size: None Orientation: Landscape Status Bar: None Top Bar: None Bottom Bar: None Mode: Scale To Fill User Interaction Enabled: Checked Drawing/Opaque: Checked Drawing/Autoresize Subviews: Checked
Size Inspector - Show: Layout Rectangle Width: 1024 Height: 768
Everything else is set to default settings.
I’m still having the same problem. Am I missing something? Not sure if this is relevant, but I’m not using storyboards.
Please help.
Thanks
M
Upvotes: 2
Views: 648
Reputation: 5302
I had a similar problem with a webView and it turned out I was missing this line:
myView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
Upvotes: 1