I am creating an app i want to show badge icon when there an notification to alert for user.
I have found out library named PPBadgeView
and i have followed the following instruction which i am using pod 'PPBadgeViewSwift'
and then pod install
In programming i want to implement rightNavigationBar with the badgeview but it doesn't show me.
What i have done:
let rightBarButton = UIBarButtonItem(image: UIImage(named: "notification")?.withRenderingMode(UIImageRenderingMode.alwaysOriginal), style: .plain, target: self, action: #selector(notificationHandle))
rightBarButton.pp.addBadge(text: "99+")
rightBarButton.pp.moveBadge(x: -5, y: 0)
rightBarButton.pp.setBadge(height: 12)
rightBarButton.pp.setBadge(flexMode: PPBadgeViewFlexMode.tail)
self.navigationItem.rightBarButtonItem = rightBarButton
When i run the app i just see the icon that i have set only. I don't know where is my badgeView.