viewdidunload is not getting called at all

前端 未结 4 1398
我在风中等你
我在风中等你 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:41

    viewdidunload is a method of a UIViewController. If you are using a UIViewController subclass to create an object and that obect's view is removed from superview then viewdidunload will be called. Make sure that your child view is made from a UIViewController.

提交回复
热议问题