View Controller being sent a message even though it has been deallocated

后端 未结 9 1486
梦毁少年i
梦毁少年i 2020-12-13 11:21

I am not sure if something has changed in the iPhone SDK 3.0 but I am getting the strangest error. I have a view controller hierarchy where I switch between view controllers

9条回答
  •  长情又很酷
    2020-12-13 12:17

    I had been experiencing the same problem until deleted some 'bumping' code lines I used to push animation like those:

    UIView* superv = navigationController.view.superview;

    [navigationController.view removeFromSuperview];

    [superv addSubview:navigationController.view];

    Definitely, the above is 'breaking' way to go since 3.0 SDK had been issued by Apple. I've been forced to use push/pop approach instead. Didn't have the problem with 2.x as well. Make sure you don't have something similar in your code.

    Hope, it helps.

提交回复
热议问题