iPhone 中的 UIviewcontroller 大小问题?
我在一个基于导航的项目中有一个 UIviewcontroller,我通过某些按钮操作将一些视图推送到该项目。
当我第一次加载此视图时,其大小在 viewwillappear
方法中显示 (0,0,320,416)
。但是,如果您再次运行它,它的大小将在同一 viewwillappear
方法中显示 (0,0,320,460)
。当您再次加载它时,我的视图似乎正在调整大小。
因此,我在推送视图中遇到了很多问题。有人可以帮我吗?
I have a UIviewcontroller
in a navigation based project, to which i am pushing some views as a result of some button action.
When I first load this view, its size is showing (0,0,320,416)
in the viewwillappear
method. But, if you run it again, its size is showing (0,0,320,460)
in the same viewwillappear
method. My view is seems to be resizing when you load it again.
Due to that I have so many problems in the pushed view. Can anybody help me please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
(0,0,320,416) 是状态栏的 - 20,导航栏的 - 44,(0,0,320,460) 只是状态栏的 -20,也许你的导航栏是半透明的?
(0,0,320,416) is - 20 for status bar and - 44 for navigation bar and (0,0,320,460) is just the -20 for the status bar, perhaps your navigation bar is translucent?.
两种尺寸之间的差异是 44 .. 这是导航栏的高度,我认为您的导航控制器有问题,或者您将其设置为半透明。
the difference between two sizes is 44 .. which is the height of the navigation bar ,, i think your problem in the navigation controller or you are set it translucent.