Skip to content

Commit 2d31766

Browse files
committed
Fix iOS 9 bug
I have fixed bug with square instead circle.
1 parent 7a556e3 commit 2d31766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UIBarButtonItem+Badge.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ - (void)updateBadgeFrame
101101

102102
// Using const we make sure the badge doesn't get too smal
103103
minWidth = (minWidth < minHeight) ? minHeight : expectedLabelSize.width;
104+
self.badge.layer.masksToBounds = YES;
104105
self.badge.frame = CGRectMake(self.badgeOriginX, self.badgeOriginY, minWidth + padding, minHeight + padding);
105106
self.badge.layer.cornerRadius = (minHeight + padding) / 2;
106-
self.badge.layer.masksToBounds = YES;
107107
}
108108

109109
// Handle the badge changing value

0 commit comments

Comments
 (0)