Is it invoked just before the main view is going to be shown
Can we call it whenever we want?
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.
It’s called whenever the view or part of the view needs to be drawn or redrawn.
It’s called when you first display the view. It’s called when you alter the view. In the life cycle of a view, it may be called hundreds or even thousands of times. For example, in a text view, it is called every time a new text character is entered.
Any change in the program state that the view must reflect visually should trigger a redraw by calling
setNeedsDisplay. This happens automatically in most cases but you may need to trigger it yourself if you do something non-standard.