Minitour / AZTabBarController

A custom tab bar controller for iOS written in Swift 4.2
MIT License
348 stars 65 forks source link

Distance from center for badgeApperance #55

Closed Willianlike closed 5 years ago

Willianlike commented 5 years ago

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

Minitour commented 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'
iDevelopper commented 5 years ago

Funny answer! A pull request would be more suitable regards to the future updates.