ios - How to use BBBadgeBarButtonItem in swift -
i want badge on barbutton , came across bbbadgebarbuttonitem not sure if work in swift or not.
- is possible ?
- if yes how ?
ps new ios , swift
when try use readme file says, getting error @ import line "expected identifier @ import declaration"
you need what's called objective-c bridging header since bbbadgebarbuttonitem written in objective-c , project swift.
see http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/ on how create bridging header.
once you've created bridging header you'll add following it:
#import bbbadgebarbuttonitem.h
you should able (untested):
let custombutton = uibutton() let barbutton = bbbadgebarbuttonitem(customuibutton: custombutton) barbutton.badgevalue = 1
Comments
Post a Comment