如何解决在我的应用中实施时XLPagerTabStrip出现问题
我正在使用Swift
在我的应用中创建我正在实现XLPagerTabStrip
,并且我已经在下面提到了博客以在此处实现链接
一切正常,尽管当我导航到主屏幕时,在状态栏上方显示的XLPagerTabStrip
是屏幕截图,我正在获取哪种输出类型
This is the screen shot of output which i am getting
This is expected output i want something like this
这是我的控制器代码
import UIKit
import XLPagerTabStrip
class HomeViewController: ButtonBarPagerTabStripViewController {
//MARK: - VARIABLEs
//MARK: - OUTLETs
//MARK: - VOID METHODs
override func viewDidLoad() {
configureButtonBar()
super.viewDidLoad()
// Do any additional setup after loading the view.
}
//MARK: - CLICKED EVENTs
//MARK: - FUNCTIONs
func configureButtonBar() {
settings.style.buttonBarBackgroundColor = .white
settings.style.buttonBarItemBackgroundColor = .white
settings.style.buttonBarItemFont = UIFont(name: "Roboto-Medium",size: 14.0)!
settings.style.buttonBarItemTitleColor = UIColor(red: 84/255,green: 84/255,blue: 84/255,alpha: 1)
settings.style.buttonBarMinimumLineSpacing = 0
settings.style.buttonBarItemsShouldFillAvailableWidth = true
settings.style.buttonBarLeftContentInset = 0
settings.style.buttonBarRightContentInset = 0
settings.style.selectedBarHeight = 3.0
settings.style.selectedBarBackgroundColor = UIColor(red: 112/255,green: 112/255,blue: 112/255,alpha: 1)
// Changing item text color on swipe
changeCurrentIndexProgressive = { [weak self] (oldCell: ButtonBarViewCell?,newCell: ButtonBarViewCell?,progressPercentage: CGFloat,changeCurrentIndex: Bool,animated: Bool) -> Void in
guard changeCurrentIndex == true else { return }
oldCell?.label.textColor = UIColor(red: 84/255,alpha: 1)
newCell?.label.textColor = UIColor(red: 112/255,alpha: 1)
}
}
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
let child1 = UIStoryboard.init(name: "Functional",bundle: nil).instantiateViewController(withIdentifier: "FeedViewController") as! FeedViewController
let child2 = UIStoryboard.init(name: "Functional",bundle: nil).instantiateViewController(withIdentifier: "ArticlesViewController") as! ArticlesViewController
return [child1,child2]
}
}
我做了与演示应用程序中提供的所有操作相同的操作,但是XLPagerTabStrip
仍然覆盖状态栏和视图,其中包含通知和菜单图标,我无法理解为什么这会导致我像演示中那样做所有操作,任何人都可以想到关于这个
如您在故事板截图中所见,我添加了菜单和通知图标,但是XLPagerTabStrip
涵盖了运行应用程序时的整个视图
谁能知道为什么会这样,然后建议我
解决方法
请阅读官方团队的博客。 XLPagerTabStrip tutorial
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。