RKNotificationHub
RKNotificationHub copied to clipboard
Not showing on pushview
` let cartBarButton: UIBarButtonItem = UIBarButtonItem(title: "Test", style: UIBarButtonItemStyle.Plain, target: self, action: nil)//#selector(self.toggleLeft)) let attributes = [NSFontAttributeName: UIFont.fontAwesomeOfSize(25)] as Dictionary! cartBarButton.setTitleTextAttributes(attributes, forState: .Normal) cartBarButton.title = String.fontAwesomeIconWithName(.ShoppingCart) cartBarButton.tintColor = CommonMainColor self.navigationItem.rightBarButtonItem = cartBarButton
let hub:RKNotificationHub = RKNotificationHub(barButtonItem: cartBarButton)
hub.increment()
hub.count = 90
hub.setCircleAtFrame(CGRectMake(15, -5, 20, 20))
**hub.pop()`**
Found a solution. Use this
let imgView = UIImageView(image: UIImage(named: "ico_cart"))
self.btncart.customView = imgView
self.hub = RKNotificationHub(view: imgView)
//additionally use these methods
self.hub?.scaleCircleSize(by: 0.7)
self.hub?.moveCircleBy(x: 5, y: 0)