I'd like to put a red circle badge on the UITabBar, but I don't know how to do it even if I google it.
I found a library like the one below, but I couldn't do it well.
https://github.com/evgenyneu/swift-badge
Thank you for your cooperation.
UIBarItem has the image(UIImage) property, so I think I should set the UIImage created with UIGraphicsBeginImageContext.
Compositing Images and Text UIGraphicsBeginImageContext
Or do you use SF Symbols?
I probably can't set the color details, but
You can also set the SF Symbols color using UIImage.withTintColor().
https://techlife.cookpad.com/entry/2021/01/05/custom-symbols-ja
© 2024 OneMinuteCode. All rights reserved.