-
Notifications
You must be signed in to change notification settings - Fork 164
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
iOS 9 makes the badge a square? #14
Comments
+1 |
I found the solution! I don't understand why, but in iOS 9 we need to update frame after layer... self.badge.layer.cornerRadius = (minHeight + padding) / 2;
self.badge.layer.masksToBounds = YES;
self.badge.frame = CGRectMake(self.badgeOriginX, self.badgeOriginY, minWidth + padding, minHeight + padding); |
I've fixed this bug. |
ok self.badge.layer.masksToBounds = YES; |
It worked. Thanks 👍 |
+1 |
1 similar comment
+1 |
add in badge's lazy getter. So it will be working on iOS 9.2. Without it doesn't work |
+1 |
I'm running 9.2 and still see the label squared. Even after lbl.clipsToBounds = YES; |
+1 |
UIBarButtonItem-Badge was working fine in iOS 8 but after upgrading to iOS 9 and Swift 2.0 the badge now shows up as a square. Anyone know a fix?
The text was updated successfully, but these errors were encountered: