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

Issue with laying out badge before UIBarButtonItem / UIButton has it's frame set (autolayout). #28

Open
jhickmanEB opened this issue Aug 30, 2016 · 0 comments

Comments

@jhickmanEB
Copy link

One nice improvement that could be made to this library, is improving the flow in which the badge view gets built / laid out.

For instance, trying to add a badge to a UIButton that is being built using Autolayout and not having a specific frame set, then the badge is placed on the top left corner of the button by default.

Another example is if you set the badge properties before assigning the UIBarButtonItem to the navigationItem.rightBarButtonItem or navigationItem.rightBarButtonItems properties, the superview is nil.

Would be nice to change the logic of the badge to wait until it's superview (UIBarButtonItem or UIButton) has been fully laid out.

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

1 participant