Before iOS5 most people did it in dealloc. By iOS5 that functionality migrated to viewDidUnload. Now that viewDidUnload is deprecated and never gets called, it would seem we will have to find new spot to unregister our observer.
Question is, where?
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.
From the Apple docs views are never unloaded anymore.
So, you put your unregister command into
-(void)deallocor-(void)didReceiveMemoryWarning. Even in Arc-(void)deallocget’s called, you just can’t have a call to[super dealloc].