Before submitting issues ...
When submitting issues, please provide the following information to help maintainers to fix the problem faster:
Please update to swift 4.
I got some warnings converting my project from swift 3.1 to swift 4
Ok now it has some bugs
the tab bar of XLPager is black and the labels positions has modified in Swift 4
and ruined everything
please fix it as soon as possible
it's image:

+1
+1
+1
+1
Open ButtonBarPagerTabStripViewController.swift file.
In ButtonBarPagerTabStripViewController class, remove UICollectionViewDelegate protocol and implement UICollectionViewDelegateFlowLayout protocol.
@allen-rahman solution works great!
Thank u man
Welcome

@allen-rahman same problem :(
+1
+1
+1
I'm using xib and faced with the same issue.
@ahmedsafadii May I test with your partial codes?
@allen-rahman what exactly do you want see ?
code which makes the screen with storyboard.
func pageMenuStyle(){
settings.style.buttonBarBackgroundColor = UIColor("294548")
settings.style.buttonBarItemBackgroundColor = UIColor("294548")
settings.style.selectedBarBackgroundColor = UIColor.white
settings.style.buttonBarItemFont = UIFont(name: "OpenSans", size: 15)!
settings.style.selectedBarHeight = 2
settings.style.buttonBarMinimumLineSpacing = 0
settings.style.buttonBarItemTitleColor = .white
settings.style.buttonBarItemsShouldFillAvailableWidth = true
settings.style.buttonBarLeftContentInset = 0
settings.style.buttonBarRightContentInset = 0
changeCurrentIndexProgressive = { (oldCell: ButtonBarViewCell?, newCell: ButtonBarViewCell?, progressPercentage: CGFloat, changeCurrentIndex: Bool, animated: Bool) -> Void in
guard changeCurrentIndex == true else { return }
oldCell?.label.textColor = UIColor.gray
newCell?.label.textColor = UIColor.white
}
}
}
@allen-rahman
First question, did you call settings.style change before super.viewDidLoad()?
You should call settings.style.* before super.viewDidLoad()
And What's your XCode version?
yeah i did and the xcode version is 9
After your super.viewDidLoad(), add this:
buttonBarItemSpec = ButtonBarItemSpec.cellClass(width: { _ -> CGFloat in
return 150 // <-- Your desired width
})
strange it works now like charm don't know what happened i just remove the library from the pod and install it again and it works :/
Happy to hear that.
Hello, i have implemented XLPagerTabStrip in Swift 4 but childView don't show contentView. Any one know what is the issue.
After your
super.viewDidLoad(), add this:buttonBarItemSpec = ButtonBarItemSpec.cellClass(width: { _ -> CGFloat in return 150 // <-- Your desired width })
Thank solution works
Most helpful comment
Open ButtonBarPagerTabStripViewController.swift file.
In ButtonBarPagerTabStripViewController class, remove UICollectionViewDelegate protocol and implement UICollectionViewDelegateFlowLayout protocol.