How can I get notified when a UIView becomes visible?

后端 未结 4 1768
面向向阳花
面向向阳花 2021-02-02 10:47

Is there a way to get a notification, a callback or some other means to call a method whenever a UIView becomes visible for the user, i.e. when a UIScrollview is the superview o

4条回答
  •  清酒与你
    2021-02-02 11:19

    I don't think there's a universal way to do this for views. Sounds like you're stuck with scrollViewDidEndScrolling and other ScrollViewDelegate methods. But I'm not sure why you say it's elegant, they're quite straightforward.

提交回复
热议问题