Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value of type 'PP<UIBarButtonItem>' has no member 'setBadgeLabel' ! #28

Open
X901 opened this issue Mar 31, 2019 · 4 comments
Open

Value of type 'PP<UIBarButtonItem>' has no member 'setBadgeLabel' ! #28

X901 opened this issue Mar 31, 2019 · 4 comments

Comments

@X901
Copy link

X901 commented Mar 31, 2019

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
Copy link

mohpor commented Apr 6, 2019

From what I gathered, it has been removed in favor of BadgeControl!
See 1a7724d for more information.

@hardikamal
Copy link

@X901 Any solution found?

@SebasDesimone
Copy link

Not a solution, but a workaround:

  1. Set the property textLabel public instead of private in PPBadgeControl

  2. 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
Copy link

@jkpang could you help ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants