XLPagerTabStrip ButtonBar粘在导航栏后面

时间:2016-10-13 12:11:28

标签: ios swift xcode xlpagertabstrip

我在swift 3应用程序中使用XLPagerTabStrip,我使用默认的ButtonBar,一切正常,但是当我启用导航栏时隐藏了这个栏: enter image description here

如果我隐藏导航栏,它会显示如下:

enter image description here

如何在不在其后面的导航栏下面,因为我需要导航栏?

Decimal

提前致谢。

4 个答案:

答案 0 :(得分:3)

我刚遇到同样的问题。只需在Interface Builder中将一个CollectionView添加到VC,并将其类设置为" ButtonBarView"。Here然后将其插座连接到左侧面板中的视图。Like this 多数,现在buttonBar应该在NavigationBar下。

答案 1 :(得分:0)

self.edgesForExtendedLayout = []

我使用nib创建PagerViewController并在viewDidLoad()中编写上述代码

答案 2 :(得分:0)

这对我有所帮助,并适用于iPhone X:

self.navigationController!.navigationBar.isTranslucent = false 

答案 3 :(得分:0)

这对我有帮助

self.edgesForExtendedLayout = UIRectEdge()
相关问题