我有2 ViewController
s,ControllerA和ControllerB。在ControllerA中单击按钮时,将按下ControllerB。我有一个带有委托的辅助类MyClass
,在ControllerA中我设置了dlegate并接收消息,现在当我进入ControllerB时,我再次设置委托并接收消息。现在当我回到ControllerA时,我得到错误:
[ViewControllerB retain]: message sent to deallocated instance
在ControllerA方法MyClass.delegate = self;
中添加ViewDidAppear
时出错。我需要将委托恢复到以前的Controller。我做错了什么?