-
Notifications
You must be signed in to change notification settings - Fork 34
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
Badge position is not in place #4
Comments
My workaround was not to call setPosition, and set the centre of the view in the setBadgeValue method. But of course it's not perfect .. |
My solution was to edit the if(badgeValue != 0 || _displayIfZero) {
[self mg_updateBadgeViewSize];
if(_position == MGBadgePositionBest)
[self mg_updateBadgeViewPosition];
} else {
self.frame = CGRectZero;
} to if(badgeValue != 0 || _displayIfZero) {
[self mg_updateBadgeViewSize];
if(_position == MGBadgePositionBest)
[self mg_updateBadgeViewPosition];
[UIView animateWithDuration:0.2f animations:^{
self.alpha=1.0f;
}];
} else {
[UIView animateWithDuration:0.2 animations:^{
self.alpha=0.0f;
}];
}
It now doesn't reposition the badge, plus animates changes between states. |
Hi, @mohpor you can also make a pool request contributing to the component if you thing you fixed something. Cheers! |
I'd always done that, but after so many unsuccessful try and not getting merged at all, I lost hope and stopped doing so. |
I upgraded my Xcode to version 6. Now, the badge position is no longer in the right place. Does anyone know how to fix it?
The text was updated successfully, but these errors were encountered: