How to force a view to render itself?

前端 未结 4 1345
自闭症患者
自闭症患者 2020-12-13 07:24

In my app I have a number of small subviews. When the user taps a subview, I place one separate view over top of the tapped subview (same size) and then animate this separa

4条回答
  •  借酒劲吻你
    2020-12-13 08:09

    After calling setNeedsDisplay it may take a moment for the drawRect to get called. Start your animation with a short (0.1f) delay. You could also call the animation method from [self performSelector:withObject:afterDelay:] to add the delay if that's easier.

提交回复
热议问题