开发者

How to redraw view while scrolling?

开发者 https://www.devze.com 2023-01-25 16:08 出处:网络
I have a UIScrollView. This scroll view scrolls my custom GameView. When I send setNeedsDisplay to my GameView, it redraws and everything goes fine.

I have a UIScrollView. This scroll view scrolls my custom GameView. When I send setNeedsDisplay to my GameView, it redraws and everything goes fine.

Except when I'm in the middle of scrolling GameView. It does not redraw until the scrolling has stopped.

Is there any way to circumvent this and just force the view during the scroll?

By the way, I already found these questions, but they d开发者_如何学Cidn't help:

UIScrollView pauses NSTimer until scrolling finishes

How do I get my UIView to redraw while the user is scrolling a UIScrollView


Try sending the view's layer displayIfNeeded immediately after setNeedsDisplay.

0

精彩评论

暂无评论...
验证码 换一张
取 消