You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then every time when I set the badgeView's text, the badgeView's height grow by 1 point.
Turns out this is what happen in the implementation of - (void)autoSetBadgeFrame: After some calculation, the badgeView decided it's frame should be origin=(x=261.5, y=14.25) size=(width=21, height=21)
Then in the line 191 of M13BadgeView.m, you called:
frame = CGRectIntegral(frame);
After that CGRectIntegral call, the frame became origin=(x=261, y=14) size=(width=22, height=22)
The documentation states CGRectIntegral's returned value :
A rectangle with the smallest integer values for its origin and size that contains the source rectangle
Here's problem, it's not simply round up the number's, it may also increase the new frame's size to contain the old frame even if the size is already a rounded number. When the text is been set multiple times, you will see the size of the badge view keep growing.
Now it's up to you to decide how to deal with it.
The text was updated successfully, but these errors were encountered:
Here's what I encountered, I have a badge view inside a UITableViewCell with these layout settings
Then every time when I set the badgeView's text, the badgeView's height grow by 1 point.
Turns out this is what happen in the implementation of
- (void)autoSetBadgeFrame
: After some calculation, the badgeView decided it's frame should beorigin=(x=261.5, y=14.25) size=(width=21, height=21)
Then in the line 191 of
M13BadgeView.m
, you called:After that CGRectIntegral call, the frame became
origin=(x=261, y=14) size=(width=22, height=22)
The documentation states CGRectIntegral's returned value :
Here's problem, it's not simply round up the number's, it may also increase the new frame's size to contain the old frame even if the size is already a rounded number. When the text is been set multiple times, you will see the size of the badge view keep growing.
Now it's up to you to decide how to deal with it.
The text was updated successfully, but these errors were encountered: