UIViewController -dealloc method not called

后端 未结 4 1394
半阙折子戏
半阙折子戏 2021-01-03 02:43

I am working with Automatic Reference Counting. I have a custom UIViewController subclass and whenever I call -presentViewController: animated:completion

4条回答
  •  借酒劲吻你
    2021-01-03 03:23

    If you use -presentViewController:animated:completion: you are retaining the parentViewController every time you call this method. ModalViewControllers are simply pushed on top of the other ViewController.

    ModalViewControllers are only designed for some kind of information / User Input and stuff like that. If you want to dealloc the ParentViewController you have to deal with your own implementation.

提交回复
热议问题