UINavigationController 偏移量
我有一个 UINavigationController,它的偏移量为 20px。 这正是我遇到的问题: http://forums.macrumors.com/showthread.php?t=761616 但我似乎无法弄清楚解决该问题的正确方法是什么。
谢谢,
I have a UINavigationController which appears at an offset of 20px.
This is the exact problem I'm having:
http://forums.macrumors.com/showthread.php?t=761616
But I can't seem to figure out what the right way to solve it is.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在我搜索了可能的解决方法后,人们说它应该以编程方式移动 20 像素。
这是我的解决方案:
现在对我来说效果很好,祝你好运〜:)
After I searched the possible way to solve, people said it should be shifted by 20 pixels programmatically.
Here is my solution:
It works fine for me now, good luck~ :)
这个问题的解决方案是将 splitviewcontroller 的框架设置为
[[UIScreen mainScreen]bounds];
例如
The solution to this problem is setting splitviewcontroller's frame to
[[UIScreen mainScreen] bounds];
e.g
确保框架设置为 (0,0)。它可能有这个空间,因为您在 Y 位置添加了 20px 以弥补状态栏,但这已经为我们处理好了。
Make sure the frame is set at (0,0). It probably has that space because you add 20px to the Y position to make up for the status bar, but that is already handled for us.
您是否已从 Interface Builder 添加状态栏作为顶部栏?可能是您为状态栏保留了空间。
Have you added a status bar as your top bar from Interface Builder?. May be you have kept space for status bar.