If a dealloc on a viewcontroller is called, then the next time when the viewcontroller is “invoked” would the initWithNibName be called again?
Share
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.
Yes, but you may be misunderstanding the relationship.
deallocmeans that the object is going away (not just leaving the screen).init...means the object is being created (not just being put on the screen). Theinit...after thedeallocis sent to a completely different (newly created) object.Many thing that people put into
initWithNibName:ordeallocthey actually mean to put intoviewWillAppear:andviewDidDisappear:. Putting logic here ensures that it is called even if the same view controller is reused.