0
我制作了一个弹出视图,其上有一个关闭视图的UIButton
。每当我把上的按钮,程序退出此消息:[MTPopupWindow performSelector:withObject:withObject:]: message sent to deallocated instance 0x84675f0
这里是header file和source file使用我使用这行代码的类:错误:发送到释放实例的消息
[MTPopupWindow showWindowWithContent:@"Some text here" insideView:self.view];
我认为有什么问题重新分配我的对象过早,但因为我使用ARC
我不知道什么是造成这个问题。我认为问题出现在这行代码中:
[self.closeBtn addTarget:self action:@selector(closePopupWindow) forControlEvents:UIControlEventTouchUpInside];
但是我看不出有什么问题。
好的,你能给我一个小小的代码示例吗? – Shinonuma 2013-03-11 14:26:09
我从NS_RETURNS_RETAINED找不到任何有用的东西,你能给我一个例子说明如何解决这个问题吗? – Shinonuma 2013-03-11 14:52:35