2013-02-04 24 views
1

我收到一個奇怪的崩潰。我有一個UITableViewController通過上下文繼續到另一個tableview控制器。UITapGestureRecognizer作爲一個殭屍崩潰期間

當一個細胞點擊,我得到一個崩潰此消息:

[UITapGestureRecognizer retain]: message sent to deallocated instance 0x8700af0 

所以我跑殭屍儀器和這裏就是它的顯示:

# Address Category Event Type RefCt Timestamp Size Responsible Library Responsible Caller 
0 0xf5f36c0 UITapGestureRecognizer Malloc 1 00:04.128.790 80 UIKit UINibDecoderDecodeObjectForValue 
1 0xf5f36c0 UITapGestureRecognizer Retain 2 00:04.128.807 0 UIKit -[UIRuntimeConnection initWithCoder:] 
2 0xf5f36c0 UITapGestureRecognizer Retain 3 00:04.128.880 0 UIKit UINibDecoderDecodeObjectForValue 
3 0xf5f36c0 UITapGestureRecognizer Retain 4 00:04.128.959 0 UIKit -[UIRuntimeConnection initWithCoder:] 
4 0xf5f36c0 UITapGestureRecognizer Retain 5 00:04.129.007 0 UIKit UINibDecoderDecodeObjectForValue 
5 0xf5f36c0 UITapGestureRecognizer Retain 6 00:04.129.017 0 UIKit UINibDecoderDecodeObjectForValue 
6 0xf5f36c0 UITapGestureRecognizer Retain 7 00:04.129.079 0 UIKit -[UINib instantiateWithOwner:options:] 
7 0xf5f36c0 UITapGestureRecognizer Release 6 00:04.129.111 0 UIKit -[UINibDecoder finishDecoding] 
8 0xf5f36c0 UITapGestureRecognizer Release 5 00:04.129.124 0 UIKit -[UINibDecoder finishDecoding] 
9 0xf5f36c0 UITapGestureRecognizer Release 4 00:04.129.130 0 UIKit -[UINibDecoder finishDecoding] 
10 0xf5f36c0 UITapGestureRecognizer Release 3 00:04.129.135 0 UIKit -[UINibDecoder finishDecoding] 
11 0xf5f36c0 UITapGestureRecognizer Release 2 00:04.129.139 0 UIKit -[UIRuntimeConnection dealloc] 
12 0xf5f36c0 UITapGestureRecognizer Release 1 00:04.129.144 0 UIKit -[UIRuntimeConnection dealloc] 
13 0xf5f36c0 UITapGestureRecognizer Release 0 00:04.130.131 0 Foundation __NSFireDelayedPerform 
14 0xf5f36c0 UITapGestureRecognizer Zombie -1 00:04.131.132 0 UIKit -[UINib instantiateWithOwner:options:] 

的tapGestureRecognizer通過IB增加,宣佈爲弱。有人建議不要在ViewDidUnload中將其設置爲零,所以我評論說。

現在,如果我去的標籤控制器中的另一個選項卡,並做一些塞格斯那裏,回來時遇到墜毀第一個表視圖控制器,也沒有崩潰,一切都完美塞格斯。

也是在這崩潰的控制器,我有兩個不同類型的顯示對象,有的只是文字,有些是圖片。只有圖像崩潰。文本單元格很好。

我上的iOS5 & iOS5.1運行此。在手機和模擬器上都會發生。這不會在iOS6設備或iOS6.1模擬器上崩潰。

有沒有人知道這裏發生了什麼?

+0

發生這種情況是因爲在父節點需要釋放後,您仍然保留手勢識別器。您可能會以創建保留週期的方式設置「UITapGestureRecognizer」。 發表一些示例代碼,我會看看它。 – jakenberg

回答

0

迄今爲止的解決辦法是刪除控制器我seguing來,這似乎導致這一問題的手勢識別。

3

我有這個完全相同的問題。我有一個靜態表格視圖,我正在使用我的菜單,將segue轉換爲其他視圖。只有我擁有手勢識別器的視圖在iOS 5中不起作用,但在iOS 6中可以正常工作。最初,我只有IBOutlets用於操作,而不是實際的手勢識別器本身。我加IBOutlets爲識別自己,現在我沒有得到任何殭屍:)

-Rojuinex

+0

嗯,我以爲我有手勢識別器,但我可能會再看一遍,我最終只是把它們拿出來 – Live2Enjoy7

0

刪除您的廈門國際銀行實現您的UITapGestureRecognizer或情節串連圖板,並使用代碼來實現它。其工作正常所有操作系統版本。