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

Sublayers not properly resized #120

Closed
Hrududu8 opened this issue Oct 31, 2014 · 1 comment
Closed

Sublayers not properly resized #120

Hrududu8 opened this issue Oct 31, 2014 · 1 comment

Comments

@Hrududu8
Copy link

When UIViews have associated sublayers and are passed into JBBarChart with:

-(UIView *)barChartView:(JBBarChartView *)barChartView barViewAtIndex:(NSUInteger)index;

the sublayers are not properly resized to match the frame of the UIView. (See picture below.) I think you need to add

for (CALayer *aLayer in barView.layer.sublayers) {
aLayer.frame = barView.bounds;
}
in the dispatch_block_t createBars around line 220 (i.e., just after the index++ line.

BTW, thanks for all the great work on this project!
without layer resizing

@terryworona
Copy link
Collaborator

Not super familiar with how subLayers align themselves when their parent's frame changes, but can't this type of thing be done in the layoutSubviews of your custom bar instance?

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