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
Problems with ShapeCircle Segmented Bar #11
Comments
Could you link an example. Line 439 is the way it is to make sure that the corner radius is always a circle, by going off the minimum of the width or height. |
Sure, this is the example: M13ProgressViewSegmentedBar* progressBar = [[M13ProgressViewSegmentedBar alloc] initWithFrame:CGRectMake(10.0, 0.0, 100.0, 20.0)]
progressBar.progressDirection = M13ProgressViewSegmentedBarProgressDirectionLeftToRight;
progressBar.indeterminate = YES;
progressBar.segmentShape = M13ProgressViewSegmentedBarSegmentShapeCircle;
[self.view addSubview:progressBar]; Anyway, I went little bit deeper and found out that the problem was the origin.y coordinate set to 0.0. Segmented Bar is actually placed few pixels above it's y coordinate and therefore in this case it was not visible. |
I'm not sure what is going on. The only frame setting for the segmented bar is done in Could you link a full project? |
I've commited a sample here: https://github.com/zvonicek/M13ProgressSuite/tree/segmentedBarBug. When you run the app and select the "Segmented Bar" TableView row, there is the new yellow view there. This view has two subviews – two Segmented Bars. Their frame differ only in As I said, replacing the line (currently 443) seems to solve it – place the Circle Segmented Bar in a correct position, but I'm not sure about the side effects. |
I'm having some issues with ShapeCircle Segmented Bar when creating it programmatically. ShapeRectangle and ShapeRoundedRect works fine, but when I change the type to ShapeCircle, segmented bar is not displayed at all.
I suppose it has something to do with calculating cornerRadius in
drawIndeterminate
method as if I replace line 439 in M13ProgressViewSegmentedBar.m withcornerRadius = _cornerRadius
, it solves the issue. However, I'm not sure about the consequences of that.The text was updated successfully, but these errors were encountered: