XLPagerTabStrip icon indicating copy to clipboard operation
XLPagerTabStrip copied to clipboard

Vertically Centralising text in BarButtonView

Open alhennessey92 opened this issue 7 years ago • 2 comments

What is the best way of vertically centralising the text of each collection view cell?

Here are my settings

`settings.style.buttonBarItemLeftRightMargin = 20 settings.style.buttonBarItemsShouldFillAvailableWidth = false settings.style.buttonBarItemFont = .systemFont(ofSize: 13, weight: 0.1) settings.style.buttonBarItemTitleColor = UIColor(red:255/255.0, green:255/255.0, blue:255/255.0, alpha:0.8)

    settings.style.buttonBarBackgroundColor = UIColor(red:255/255.0, green:255/255, blue:255/255.0, alpha:1.0)
    settings.style.buttonBarItemBackgroundColor = UIColor(red:255/255.0, green:255/255.0, blue:255/255.0, alpha:1.0)
    settings.style.selectedBarBackgroundColor = UIColor(red:32/255.0, green:163/255.0, blue:213/255.0, alpha:1.0)
    settings.style.selectedBarHeight = 2
    
    settings.style.buttonBarMinimumLineSpacing = 0
    settings.style.buttonBarLeftContentInset = 20
    settings.style.buttonBarRightContentInset = 20
    changeCurrentIndexProgressive = { [weak self] (oldCell: ButtonBarViewCell?, newCell: ButtonBarViewCell?, progressPercentage: CGFloat, changeCurrentIndex: Bool, animated: Bool) -> Void in
        guard changeCurrentIndex == true else { return }
        oldCell?.label.textColor = self?.nonSelectedColor
        newCell?.label.textColor = self?.selectedColor
        oldCell?.label.font = self?.nonSelectedFont
        newCell?.label.font = self?.selectedFont
    }`

Here is a screenshot, i want to make the gap between the text and the indicator smaller

new screen

alhennessey92 avatar Jul 04 '17 09:07 alhennessey92

same problem

ciamine avatar Jan 01 '18 14:01 ciamine

@alhennessey92 Did you manage to fix this issue?

TonyNikolov avatar Mar 08 '18 13:03 TonyNikolov