I'm wondering, is there a way to get a delegate or something, when a particular UIView
has been shown on the screen ?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
Swift version. Inside your UIView class just:
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! =)
If you manage your logic directly inside the UIView, use:
If you manage your logic inside a UIViewController, use :
If you are managing the
UIView
via aUIViewController
, then you can use the-viewDidAppear:
method:Try these: