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