iPhone 中的 UIviewcontroller 大小问题?

发布于 2025-01-07 19:33:49 字数 288 浏览 5 评论 0原文

我在一个基于导航的项目中有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花想c 2025-01-14 19:33:49

(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?.

惯饮孤独 2025-01-14 19:33:49

两种尺寸之间的差异是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文