viewdidunload is not getting called at all

前端 未结 4 1407
我在风中等你
我在风中等你 2020-12-18 03:23

My problem is like this:

  1. Parent class loads a child view.
  2. Child removes itself during an action by using \"removeFromSuperView\".
  3. Parent clas
4条回答
  •  清歌不尽
    2020-12-18 03:48

    An additional note is that viewDidUnload may be not executed before dealloc. This happens when the UIViewController reference count reach 0.

    As the Xcode template says:

    - (void)viewDidUnload {
        [super viewDidUnload];
        // Release any retained subviews of the main view.
        // e.g. self.myOutlet = nil;
    }
    

提交回复
热议问题