2014-04-29 43 views
2

我的應用程序崩潰,這是我所得到表視圖碰撞上向左滑動,每當我上向左滑動單元

-[UITableViewCellScrollView _tableView]: unrecognized selector sent to instance 0x166a1960 
-[UITableViewCellScrollView _tableView]: unrecognized selector sent to instance 0x166a1960 
Stack Trace: (
    0 CoreFoundation      0x2fc08f23 <redacted> + 154 
    1 libobjc.A.dylib      0x3a39fce7 objc_exception_throw + 38 
    2 CoreFoundation      0x2fc0c837 <redacted> + 202 
    3 CoreFoundation      0x2fc0b137 <redacted> + 706 
    4 CoreFoundation      0x2fb5a098 _CF_forwarding_prep_0 + 24 
    5 UIKit        0x3262ef91 <redacted> + 184 
    6 UIKit        0x325be3f5 <redacted> + 816 
    7 UIKit        0x32468a21 <redacted> + 148 
    8 UIKit        0x325ce0cf <redacted> + 78 
    9 UIKit        0x324681eb <redacted> + 458 
    10 UIKit        0x32467c4b <redacted> + 666 
    11 UIKit        0x3243ce75 <redacted> + 196 
    12 UIKit        0x3243b541 <redacted> + 7120 
    13 CoreFoundation      0x2fbd3fef <redacted> + 14 
    14 CoreFoundation      0x2fbd34b7 <redacted> + 206 
    15 CoreFoundation      0x2fbd1ca7 <redacted> + 630 
    16 CoreFoundation      0x2fb3c769 CFRunLoopRunSpecific + 524 
    17 CoreFoundation      0x2fb3c54b CFRunLoopRunInMode + 106 
    18 GraphicsServices     0x34aa96d3 GSEventRunModal + 138 
    19 UIKit        0x3249b891 UIApplicationMain + 1136 
    20 Event Receiver      0x000c3849 main + 116 
    21 libdyld.dylib      0x3a89dab7 <redacted> + 2 
) 

我嘗試添加符號斷點 - [NSObject的(NSObject的)doesNotRecognizeSelector :]但是沒有顯示這一段代碼發送的選擇

更新:此時我使用的模擬器,並試圖崩潰該應用和我得到這個現在:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewCellScrollView _tableView]: unrecognized selector sent to instance 0x8e46570' 
*** First throw call stack: 
(
    0 CoreFoundation      0x01ad91e4 __exceptionPreprocess + 180 
    1 libobjc.A.dylib      0x018588e5 objc_exception_throw + 44 
    2 CoreFoundation      0x01b76243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275 
    3 CoreFoundation      0x01ac950b ___forwarding___ + 1019 
    4 CoreFoundation      0x01ac90ee _CF_forwarding_prep_0 + 14 
    5 UIKit        0x00785f7a -[UITableViewCellScrollView gestureRecognizerShouldBegin:] + 203 
    6 UIKit        0x008b5466 -[UIGestureRecognizer _shouldBegin] + 1309 
    7 UIKit        0x008b1d89 -[UIGestureRecognizer setState:] + 171 
    8 UIKit        0x008e39d7 -[UIPanGestureRecognizer touchesMoved:withEvent:] + 142 
    9 UIKit        0x0099792a -[UIScrollViewPanGestureRecognizer touchesMoved:withEvent:] + 89 
    10 UIKit        0x005597d8 -[UIWindow _sendGesturesForEvent:] + 649 
    11 UIKit        0x0055a971 -[UIWindow sendEvent:] + 1021 
    12 UIKit        0x0052c5f2 -[UIApplication sendEvent:] + 242 
    13 UIKit        0x00516353 _UIApplicationHandleEventQueue + 11455 
    14 CoreFoundation      0x01a6277f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 
    15 CoreFoundation      0x01a6210b __CFRunLoopDoSources0 + 235 
    16 CoreFoundation      0x01a7f1ae __CFRunLoopRun + 910 
    17 CoreFoundation      0x01a7e9d3 CFRunLoopRunSpecific + 467 
    18 CoreFoundation      0x01a7e7eb CFRunLoopRunInMode + 123 
    19 GraphicsServices     0x03dba5ee GSEventRunModal + 192 
    20 GraphicsServices     0x03dba42b GSEventRun + 104 
    21 UIKit        0x00518f9b UIApplicationMain + 1225 
    22 Event Receiver      0x000056cd main + 141 
    23 libdyld.dylib      0x026a5701 start + 1 
) 
+0

固定這只是一個猜測,因爲我需要看到更多,但是這隻會在ios7上失敗,而且它只會在某些時候失敗?有一個新的左手滑動手勢將「彈出」當前的視圖控制器。不過,遊客必須從左邊緣開始。我相信它應該足夠聰明,不會彈出「根」視圖控制器,但您可能需要這樣標記它。 – dboals

+0

@dboals我在一年前建立了這個項目,它曾經工作得很好,但我開始再次在這個項目上工作,我注意到這個問題,當我在我的7上測試它。1 iphone,我沒有實現任何手勢識別代碼 –

+0

是的,你不必實現它,你可以免費獲得它。我經過慘痛的教訓才學到這個。我沒有崩潰,但每次我嘗試在水平滾動窗口上向左滾動時,它都會彈出我的視圖控制器。 – dboals

回答

0

考慮你得到的錯誤,這些行:

0x01ac90ee _CF_forwarding_prep_0 + 14 
0x00785f7a -[UITableViewCellScrollView gestureRecognizerShouldBegin:] + 203 

看來你莫名其妙定置的UITableViewCellScrollView實例作爲手勢識別的代表。由於UITableViewCellScrollView可能沒有實現UIGestureRecognizerDelegate協議,您最終會得到無法識別的選擇器異常。

仔細檢查每個表格單元中的手勢識別器,並檢查其代表的身份。

+0

我該怎麼做呢?事實上,當我遇到這個崩潰時,我遇到了UITableViewCellScrollView,我沒有實現任何手勢識別 –

1

通過施加一些着色至細胞,只見,當我滑動單元從附件視圖應用程序崩潰

enter image description here


周圍的工作是設置accessoryType到tableView中的UITableViewCellAccessoryNone:cellForRowAtIndexPath:

cell.accessoryType = UITableViewCellAccessoryNone; 


參考文獻: - 如何使一個滑動式表視圖細胞與行動 - 沒有去螺母滾動在表格視圖單元視圖here

-A仔細查看here

1

嗨〜我剛剛通過刪除我的自定義UItableview Cell中的代碼來解決此錯誤,但我不知道它是否可以幫助您

self.contentView.userInteractionEnabled = NO; 

在我的情況下,禁用userinteractionEnabled細胞內容視圖會引起什麼時候我試圖向左或向右滑動在自定義UItableView在iOS7, 死機一樣,它應當刪除它

+0

歡迎來到StackOverflow。你能澄清你是否刪除或添加了該行代碼?在提問者的問題中我沒有看到它。 –

+0

提問者的問題沒有提供他的任何代碼,只是顯示錯誤日誌報告。這就是爲什麼我無法確定導致崩潰的原因是我已經刪除的代碼行 –

+0

公平不夠,Wilson。 +1。 –