During the development of iPhone applications, I encountered a problem when I tested my code over the past few days: Whenever I pop from one side to the root page, I want to restore to the previous status. But I encountered a problem. What should I do?
At the beginning, the-(void) viewdidload function was executed all the time since it entered the corresponding page, so it seldom pays attention to some processing when Pop arrived at this page. However, today we have encountered a problem that needs to be executed when Pop reaches this page, but here we also need to note that when Pop arrives at this page, it is executed-(void) the condition of viewdidload is that a memory warning is triggered and void viewdidunoad is executed. This is important. After some exploration, we found that some variable with default values can be used for control. Of course, this is what we all know. However, we usually do not use variables that are not initialized, and only the system gives a default value.
In fact, there is no purpose in writing this article. I want to share my feelings with you. I hope that you will not forget some of our common habits, we can still adopt some usable methods that we often avoid making troubles.