Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buttonBarItemsShouldFillAvailiableWidth issue when we use larger font sizes #168

Open
Ta7an opened this issue May 17, 2016 · 4 comments
Open

Comments

@Ta7an
Copy link

Ta7an commented May 17, 2016

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

@ludoded
Copy link

ludoded commented Jun 22, 2016

@Ta7an hi, have you solved this issue?

@kahopoon
Copy link

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
screen shot 2016-06-30 at 12 25 19

@AhonVashibaka
Copy link

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.

@ElectroBuddha
Copy link

I had this issue on iPad. I can confirm that kahopoon's suggestion also solved this problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants