Value of type 'PP<UIBarButtonItem>' has no member 'setBadgeLabel' !
X901 opened this issue · 4 comments
X901 commented
what happened to this function?
buttonItem?.pp.setBadgeLabel(attributes: { (badgeLabel) in
badgeLabel.font = UIFont.systemFont(ofSize: 13)
badgeLabel.textColor = UIColor.blue
})
in the last version and Swift 5
it gives me an error
Value of type 'PP' has no member 'setBadgeLabel'
mohpor commented
From what I gathered, it has been removed in favor of BadgeControl!
See 1a7724d for more information.
hardikamal commented
@X901 Any solution found?
SebasDesimone commented
Not a solution, but a workaround:
-
Set the property
textLabel
public instead of private inPPBadgeControl
-
Convert the code, from:
buttonItem?.pp.setBadgeLabel(attributes: { (badgeLabel) in
badgeLabel.font = UIFont.systemFont(ofSize: 13)
badgeLabel.textColor = UIColor.blue
})
to
buttonItem?.pp.badgeView.textLabel.font = UIFont.systemFont(ofSize: 13)
buttonItem?.pp.badgeView.textLabel.textColor = UIColor.blue
my 2c,
starlight173 commented
@jkpang could you help ?