HsoiEnterprises / HELargeCenterTabBarController

A Swift UITabBarController with a larger center tab.
Other
45 stars 7 forks source link

reference to centerButton #12

Closed leo4life2 closed 7 years ago

leo4life2 commented 7 years ago

I'm trying to make my center tab have some spacing to the bottom, but I can't access the center button. Can you add references so that we can edit the center button or the constraints for the center button?

hsoi commented 7 years ago

The button is intentionally not exposed because that it is a button is an implementation detail - not part of the public API.

If what you need is cosmetic spacing, my suggestion would be to make this as a part of the button image. Let the physical button remain where it is, and just put "borders" or other spacing within the image content itself. Remember: that it is a button is an implementation detail the user is unaware of, so if the button was moved it would open up space where a user might be able to tap (in what appears to be the button's area, but isn't hitting the button) and thus you would have interesting behaviors to have to contend with. If instead the button remains where it is and you just use image content cosmetics to achieve the look you want, the hit-area remains proper.

If that won't work for your need, I'm happy to accept a fork and a pull request with a suggested solution that provides the solution you need but also maintains the integrity of the class design. You understand your need best, hence my suggestion for a pull request.