Closed Willianlike closed 5 years ago
@Willianlike You are more than welcome to fork the repo and modify the source code. Then in your project you can directly install using CocoaPods from your fork:
pod 'AZTabBar', :git => 'https://github.com/Willianlike/AZTabBarController.git'
Funny answer! A pull request would be more suitable regards to the future updates.
I can't set custom distance, because:
open func setBadgeText(_ text: String?, atIndex index:Int){ if let buttons = buttons{ if index < buttons.count{ self.notificationBadgeAppearance.distanceFromCenterX = 15 self.notificationBadgeAppearance.distanceFromCenterY = -10 let button = buttons[index] as! AZTabBarButton button.addBadge(text: text, appearance: notificationBadgeAppearance) } }else{ self.badgeValues[index] = text } }
Custom badge code:
var badge = BadgeAppearance() badge.backgroundColor = design.design.colors.primary_button_color badge.borderWidth = 0 badge.textColor = design.design.colors.text_on_button_color badge.distanceFromCenterY = 0 badge.distanceFromCenterX = 0 tabbar.notificationBadgeAppearance = badge
Please, fix it