自动调整第二个视图大小时出现问题
一旦从 appdelegate 调用视图,它就会正确加载,但不会正确自动调整大小,在底部您会看到上一个视图的最后几行!在 xib 文件中,视图模式属性设置为缩放以填充,但我尝试了其他方法,但仍然发生同样的情况...感谢您提供任何解决问题的想法!
Once a view is called from appdelegate, it is properly loaded but not autosized correctly, on the bottom you see last lines from previous view! On xib file, view mode property is set to scale to fill but I tried others and still happening the same... Thanks for any idea to solve it!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许检查界面生成器,视图是否使用任何模拟用户界面元素?这并没有直接回答您的问题,但可能值得一看,例如状态栏通常是默认模拟的。
Maybe check Interface Builder, is the view using any of the Simulated User Interface Elements? That isn't directly answering your question but it might be worth a look, e.g. the status bar is normally simulated by default.
控制自动调整大小的标准方法是
self.View.autoresizingMask = UIViewAutoresizingFlexibleHeight
(或st.else)self.View.autoresizesSubviews = YES;
您也可以尝试手动设置大小
The standart way to control autosizing is by
self.View.autoresizingMask = UIViewAutoresizingFlexibleHeight
(or st. else)self.View.autoresizesSubviews = YES;
You might also try to just set the size manually