iOS 8 動畫執行過程中返回 Crash

來源:互聯網
上載者:User

標籤:技術分享   ras   scroll   tableview   display   cat   dylib   off   uikit   

之前項目裡一直有個iOS8 [UIScrollView(UIScrollViewInternal) _notifyDidScroll] crash的問題,存在了很久,後來複現問題,返現是動畫執行過程中執行pop 的問題 情境:在商品詳情頁加車之後  做了滑動到下面的商品推薦位置, 當動畫還沒有執行完畢, 就POP回上個頁面,就會發生如下Crash 參考文檔 https://stackoverflow.com/questions/26103756/uiscrollview-internal-consistency-crash   Crashed: com.apple.main-thread0  libobjc.A.dylib                0x195287bdc objc_msgSend + 281  UIKit                          0x18876fbbc -[UIScrollView(UIScrollViewInternal) _notifyDidScroll] + 722  UIKit                          0x1884acdb4 -[UIScrollView setContentOffset:] + 5003  UIKit                          0x188562a98 -[UITableView setContentOffset:] + 3004  UIKit                          0x188646234 -[UIAnimator(Static) _advanceAnimationsOfType:withTimestamp:] + 3165  QuartzCore                     0x187e2629c CA::Display::DisplayLinkItem::dispatch() + 326  QuartzCore                     0x187e26134 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 3247  IOKit                          0x184c01470 IODispatchCalloutFromCFMessage + 3768  CoreFoundation                 0x1839f2dc4 __CFMachPortPerform + 1809  CoreFoundation                 0x183a07a54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 5610 CoreFoundation                 0x183a079b4 __CFRunLoopDoSource1 + 43611 CoreFoundation                 0x183a05934 __CFRunLoopRun + 164012 CoreFoundation                 0x1839312d4 CFRunLoopRunSpecific + 39613 GraphicsServices               0x18d1476fc GSEventRunModal + 16814 UIKit                          0x1884f6fac UIApplicationMain + 148815 ZZKKO                          0x100393c74 main (main.m:16)16 libdyld.dylib                  0x1958f2a08 start + 4  原因: iOS8系統下 ViewController被 控制器pop出堆棧以後 ,tableView 已經被release掉,但是 代理方法 仍舊會試圖調用 send 訊息 到 它的delegate方法。  解決辦法  - (void)dealloc {    self.tableView.delegate = nil;    self.tableView.dataSource = nil;}

iOS 8 動畫執行過程中返回 Crash

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.