XLPagerTabStrip
XLPagerTabStrip copied to clipboard
buttonBarItemsShouldFillAvailiableWidth issue when we use larger font sizes
I have a four tabs button bar view with font size 14.0, tabs fit text in buttons and all of them are aligned to left and a space <around 20-30 points> is plain on the right side in the button bar view
Here is code:
settings.style.selectedBarBackgroundColor = UIColor.whiteColor()
// each buttonBar item is a UICollectionView cell of type ButtonBarViewCell
settings.style.buttonBarItemBackgroundColor = UIColor.clearColor()
if let font = UIFont(name: "DroidArabicKufi", size: CGFloat(14.0)) {
settings.style.buttonBarItemFont = font
}
// helps to determine the cell width, it represent the space before and after the title label
// settings.style.buttonBarItemLeftRightMargin: CGFloat = 8
settings.style.buttonBarItemTitleColor = UIColor.whiteColor()
// in case the barView items do not fill the screen width this property stretch the cells to fill the screen
settings.style.buttonBarItemsShouldFillAvailiableWidth = true
@Ta7an hi, have you solved this issue?
i have the same problem too that align all things at left and blank at right, after i try to look at the Button Bar View in storyboard, it has the default value of cell size 's width and height, spacing bla bla bla, i put their value at all 0, problem solved for me

Tried method that kahopoon suggested and my XCode hanged up twice. The reason was that I leaved Cell Width equal to 50 and changed to zero all other fields. When I make all fields equal to zero, beginning with Cell Height, all was ok. So be careful with that magic :) Had send report to Apple, so let us hope they will correct this bug.
I had this issue on iPad. I can confirm that kahopoon's suggestion also solved this problem for me.