简体   繁体   中英

Xcode 4.6: Only Portrait Area Active in Landscape iPad app

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

我在使用webView时遇到了类似的问题,结果我错过了这一行:

myView.autoresizingMask = UIViewAutoresizingFlexibleWidth;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM