문제

enter image description here

As displayed above, default badge appears in red and white color. Can we change its color scheme and customize that view?

The only solution I found was, creating entire UITabbarController as custom control. Can't I use default control and only update badge or provide custom UI to badge?

도움이 되었습니까?

해결책 2

I couldn't find any way to create custom badge for UITabBarItem. The only way to achieve this is to use custom UIButton/UIViews.

다른 팁

You could just create view(UIButton for example.) with the color (or background image) and text you want and add that to the tabbar on the place you want. But I think that would be some kind dirty implementation... Coz, you need to calculate the frame according to how many UITabbarItems you have. Otherwise, custom tabbar controller is the way to go :) I don't think customization of the default badge is possible. Good Luck!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top