我有一个带有容器视图的UIViewController.此容器视图包含UITableViewController.
UIViewController嵌入在UINavigationController中.
自己导航控制器.导航栏.半透明=否;
容器视图在其顶部添加了一些空间,就好像它有自己的导航栏一样.每当我将"半透明"设置为"是"时,视图都会正确显示所有内容.只有当我将"半透明"设置为"否"时,才会在包含的视图上发生这种情况.
这里有我遗漏的东西吗?
我try 在包含的视图中将半透明设置为YES
,并将其设置为隐藏,但没有任何效果.
我认为设置半透明性只会影响半透明性,而不会影响视图的位置.
当半透明=是
+---------------------------------+
| |
| UINavigationBar |
| |
+---------------------------------+
| |
| |
| |
| |
| |
| UITableViewController |
| in a Contained View |
| |
| |
| |
| |
| |
| |
+---------------------------------+
当半透明=否
+---------------------------------+
| |
| UINavigationBar |
| |
+---------------------------------+
| |
|blank space created on top of view
| |
+---------------------------------+
| |
| |
| |
| |
| |
| |
| UITableViewController |
| in a Contained View |
| |
+---------------------------------+
另外,我的观点比这更复杂,我很简单.