In a ViewController, there is ViewDidLoad to know when the VC has loaded.
For a UIView, what method do i have to use when the view loaded?
Would this method be called with any init?
edit:
No XIB, just programmatically.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you load it from a
XIBfile, theawakeFromNibmethod will be called once loading finishes:Update; In the case of no XIB, you will probably have to infer it using one of the methods from the Observing View-Related Changes area of the docs (for example,
didMoveToSuperview). However, a better way is to send a message to your views from the view controller’sviewDidLoadmethod if possible.