You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Thank you @RojS for opening this bug and for actually documenting it!
This is definitely a duplicate of #34, but since this issue is much clearer, we'll keep this one.
Would you be interested in submitting a PR to fix it?
We also need to make sure that the same issue doesn't occur with circled checboxes.
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.
Boris-Em
changed the title
Borders With Odd Numbers of Pixels Are Not Drawn Correctly
Border gets drawn outside of bounds
Feb 21, 2017
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: