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

Update the badge position more frequently #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ricsantos
Copy link

A couple of issues were raised related to the badge position not working: #3, #4 and #7. This fixes that.

Basically, always update the position, and updated before drawing also.

@ricsantos
Copy link
Author

cc @matteogobbi @SilkyPantsDan @swoolcock

@@ -42,6 +42,8 @@ - (instancetype)initWithFrame:(CGRect)frame {
}

- (void)drawRect:(CGRect)rect {
[self mg_updateBadgeViewSize];
[self mg_updateBadgeViewPosition];
Copy link
Owner

@matteogobbi matteogobbi Feb 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the 2 lines above are necessary and I would prefer to not have these calls here.


if(_position == MGBadgePositionBest)
[self mg_updateBadgeViewPosition];
[self mg_updateBadgeViewPosition];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed if the position isn't best.
You probably want put back the old code and add a call to mg_updateBadgeViewSize (for all the changes from here to the end)

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

Successfully merging this pull request may close these issues.

2 participants