【发布时间】:2012-11-03 23:29:40
【问题描述】:
我有一个 UIScrollView,其中包含一些控制器:带有背景图像的 imageView 和其他,
当我旋转手机时,它不会自动调整控制器的大小
我在UIWebView auto rotation corrupts web view content (screenshots inside) 中阅读了 2 个类似的问题 Scale image to fit screen on iPhone rotation 我尝试将这些代码添加到 viewDidLoad
self.view.autoresizesSubviews = YES;
self.imageView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
self.scrollView.autoresizingMask =(UIViewAutoresizingFlexibleWidth
| UIViewAutoresizingFlexibleHeight);
问题也没有解决。 请帮助我解决这次崩溃,非常感谢。
【问题讨论】:
标签: iphone uiviewcontroller autoresize nsscrollview