Best way to refresh/reload UIScrollView

前端 未结 6 1975
走了就别回头了
走了就别回头了 2021-01-04 05:59

I have a method that adds some subviews (images/buttons) to my ScrollView.

The thing is that from outside of the ScrollView the user can tap a button that will chang

6条回答
  •  隐瞒了意图╮
    2021-01-04 06:05

    Upon removing any unneeded views (which I'm assuming you're not going to be able to work around) call [myScrollView setNeedsDisplay]; to refresh the UIScrollView on the next drawing cycle.

提交回复
热议问题