UIView did appear?

后端 未结 5 1732
没有蜡笔的小新
没有蜡笔的小新 2021-02-05 00:25

I\'m wondering, is there a way to get a delegate or something, when a particular UIView has been shown on the screen ?

5条回答
  •  北海茫月
    2021-02-05 00:56

    Another way to find out when a control is on screen is to subclass the View or Control and override drawRect...

    However, it's called when it's drawn and not only when first shown. So it's only sometimes what you want. It worked for my case. Make sure to call super as well! =)

提交回复
热议问题