Black bar overtop navigation bar

痞子三分冷 提交于 2019-12-24 08:46:24

问题


Im creating an app that uses a navigation controller for a couple of the views. When i finally figured out how to set it up this happened:

So obviously the black bar at the top is not supposed to be there, but i dont know what to do to get rid of it. Any ideas?


回答1:


This is also commonly seen when setting up a view programmatically. Be sure to use:

myView.frame = self.view.bounds;

and not:

myView.frame = self.view.frame;



回答2:


Looks like your view thinks it's supposed to have a status bar. Go into the XIB file and under the fourth tab in Simulated Metrics set Status Bar to None.



来源:https://stackoverflow.com/questions/7205800/black-bar-overtop-navigation-bar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!