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

M13ProgressViewMetroAnimationShapeLine #33

Closed
GuyFran opened this issue Jun 11, 2014 · 1 comment
Closed

M13ProgressViewMetroAnimationShapeLine #33

GuyFran opened this issue Jun 11, 2014 · 1 comment

Comments

@GuyFran
Copy link

GuyFran commented Jun 11, 2014

Hi.
I'm not sure why but whenever I use the line shape M13ProgressViewMetroAnimationShapeLine with the metro HUD and when the view frame is not a square the line pattern is actually rotated.

Is that expected behaviour ?

@GuyFran
Copy link
Author

GuyFran commented Jun 11, 2014

Found the issue in the class M13ProgressViewMetro.m

else if (animationShape == M13ProgressViewMetroAnimationShapeLine) {
//Create the path
animationPath = [UIBezierPath bezierPath];
[animationPath moveToPoint:CGPointMake(-_dotSize.width, self.bounds.size.height / 2)];
[animationPath addLineToPoint:CGPointMake(self.bounds.size.width + _dotSize.width, self.bounds.size.width / 2)];

last parameter should be height/2 , not the width

else if (animationShape == M13ProgressViewMetroAnimationShapeLine) {
//Create the path
animationPath = [UIBezierPath bezierPath];
[animationPath moveToPoint:CGPointMake(-_dotSize.width, self.bounds.size.height / 2)];
[animationPath addLineToPoint:CGPointMake(self.bounds.size.width + _dotSize.width, self.bounds.size.height / 2)];

Marxon13 pushed a commit that referenced this issue Jun 17, 2014
Fixed issue that caused the metro progress bar to not be vertically
centered when displaying as a line.
This issue was closed.
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

No branches or pull requests

2 participants