UISegmentedControl in iOS 7 divider image is wrong during animation

前端 未结 6 860
清歌不尽
清歌不尽 2020-12-25 15:05

I have a custom UISegmentedControl. In iOS 6 and bellow it works fine. Under iOS 7.. it looks fine until I press the control, at which time, the divider image looks weird fo

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-25 15:19

    I was experiencing a similar problem and figured out that there are two things going on. One of them you've already dealt with (setting up images for the highlighted/selected combos). The other is that UISegmentedControl does a color highlight when you select a new segment like UITableViewCells do when you select them. And, even though I've customized all the art and the text, it's still fading to a dark color (my text even inverts) and then it comes back. During that fade, the edges of my dividers are easily seen.

    I had to turn on Slow Animations in the Simulator to see this more clearly. Unfortunately, I have not been able to find a way to disable those default animations.

提交回复
热议问题