A very small PR. I noticed a glitch where the reversible arrow graphic would periodically jump up 1 point.
It turns out this is because [UILabel sizeToFit] can sometimes be a bit unpredictable in terms of floating point height, and the number of times I was calling layoutSubviews meant it was potentially jittering un-necessarily.
This PR makes it so sizeToFit is called more sparingly, which fixed the layout issue.
I also did a per-pixel compare to UISegmentedControl and discovered the inner view box wasn't rounded enough by a value of 0.5. That's fixed as well. :)
A very small PR. I noticed a glitch where the reversible arrow graphic would periodically jump up 1 point.
It turns out this is because
[UILabel sizeToFit]
can sometimes be a bit unpredictable in terms of floating point height, and the number of times I was callinglayoutSubviews
meant it was potentially jittering un-necessarily.This PR makes it so
sizeToFit
is called more sparingly, which fixed the layout issue.I also did a per-pixel compare to
UISegmentedControl
and discovered the inner view box wasn't rounded enough by a value of 0.5. That's fixed as well. :)