本文介绍了导航栏上方的黑条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个应用程序,该应用程序将导航控制器用于几个视图.当我终于弄清楚如何设置它时,发生了:

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?

推荐答案

这在以编程方式设置视图时也很常见.请务必使用:

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

myView.frame = self.view.bounds;

而不是:

myView.frame = self.view.frame;

这篇关于导航栏上方的黑条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 22:59