-
Notifications
You must be signed in to change notification settings - Fork 287
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
Border gets drawn outside of bounds #47
Comments
Thank you @RojS for opening this bug and for actually documenting it! Also, I think that this issue should happen even with even numbers of pixels. I will update the title of the bug to reflect that. Since this is a breaking change, we'll have to release it as part of v2.0. |
Fixed in #93 |
Before “complaining” about small bugs I would like to say thanks for the work you have put into this control, it is a pleasure to use and much appreciated!
This is probably related to Clipped border #34 .
When trying to mimic the border width of 3 pixels of a UISwitch the lineWidth property of the BEMCheckBox was set to 1.5. The image below shows the effect with a square BEMCheckBox.
Note also that the height of the BEMCheckBox was set to the same height as the UISwitch, 31 (62 pixels), and yet the BEMCheckBox is drawn larger than the UISwitch. This also occurs with the width.
If the code in
pathForBox
is changed topath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0.0 + (_lineWidth / 2.0), 0.0 + (_lineWidth / 2.0), self.size - _lineWidth, self.size - _lineWidth) cornerRadius:3.0];
and
CGFloat radius = (self.size / 2.0) - (self.lineWidth / 2.0);
respectivley for
BEMBoxTypeSquare
andBEMBoxTypeCircle
.this results in the expected behaviour.
The text was updated successfully, but these errors were encountered: