UI 中频繁出现错误(从导航推送标签栏)
我已经多次遇到这个错误了。我有一个带有导航控制器的应用程序(导航栏隐藏)。当“按下”按钮时,我想用 tabbarviewcontroller 推送另一个视图。当新视图被推送时,它比应有的位置低 20 像素(并且选项卡栏的一部分不可见)。
如果我从 tabbarviewcontroller 输入模态视图控制器然后关闭它,则 tabbarviewcontroller 将正确显示。
我将每个视图中的状态栏设置为未指定(认为这就是问题),并且我未选中每个视图中的自动调整大小子视图。
I have encountered this bug several times. I have a application with a navigation controller (navbar hidden). when a button is "pressed" i want to push another view with a tabbarviewcontroller. When the new view is pushed, it's 20 pixels lower than it should (and part of the tabbar is not visible).
If I enter modal-view controller from the tabbarviewcontroller and then i dismiss it, the tabbarviewcontroller is shown properly.
I put the status bar in every view to be unspecified (thought that was the problem) and i un-checked the autoresize subviews from each view.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在您的代码中使用bounds属性而不是应用程序框架。在我看来,它也有效,希望万一也能有效......:)
in your code use bounds property instead of application frame . in my it worked hope to work in case too.......:)
这听起来可能与已知的 NIB/XIB 文件错误有关(有关更多信息,请参阅:http://forums.bignerdranch.com/viewtopic.php?f=51&t=125)
正如链接的论坛主题所建议的,解决方法只需使用下列的:
This sounds like it might be related to a known NIB/XIB file bug (for more information see: http://forums.bignerdranch.com/viewtopic.php?f=51&t=125)
As the linked forum topic suggests, for a workaround simply use the following:
谢谢你的回答。我以某种方式做到了,稍微玩了一下标签栏的框架。
我记得不久前尝试过这个但没有成功。现在它做到了。
另外,干预边界也有一点帮助。
thank you for your answers. i did it somehow, playing with the tabbar's frame a bit.
i remember trying this a while ago and not working. now it did.
also, medling with bounds helped a bit.