我有一个tableview与展开/ collapsable部分。它工作正常的iOS 8,但在iOS的9 reloadSections崩溃这是代码:ReloadSections崩溃:iOS 9
NSRange range = NSMakeRange(selectedSection, 1); [_tableView reloadSections:[NSIndexSet indexSetWithIndexesInRange:range] withRowAnimation:UITableViewRowAnimationAutomatic];
我已经看过了这个问题,似乎有些人都遇到过,但没有一个解决方案还没有工作为了我。当然,我可以重新加载表,但这不会给我动画的样子,我只是不希望整个tableview重新加载。这里是(在控制台通过命令bt)我唯一的日志:
thread #1: tid = 0xfecd, 0x25be16aa UIKit__46-[UITableView _updateWithItems:updateSupport:]_block_invoke + 98, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffc)
frame #0: 0x25be16aa UIKit__46-[UITableView _updateWithItems:updateSupport:]_block_invoke + 98
frame #1: 0x25d074fc UIKit__46-[UITableView _updateWithItems:updateSupport:]_block_invoke1011 + 184
frame #2: 0x25be10b4 UIKit-[UITableView _updateWithItems:updateSupport:] + 2348
frame #3: 0x25bc5684 UIKit-[UITableView _endCellAnimationsWithContext:] + 10648
frame #4: 0x25bc2b5a UIKit-[UITableView _updateSections:updateAction:withRowAnimation:headerFooterOnly:] + 434
frame #5: 0x25bc299e UIKit`-[UITableView reloadSections:withRowAnimation:] + 38
frame #6: 0x0028d956 MyAPP-[MyView expandCollapseSection:](self=0x16f90170, _cmd=0x0096e193, sender=0x16fec2d0) + 1230 at MyView.m:256
frame #7: 0x25a09770 UIKit-[UIApplication sendAction:to:from:forEvent:] + 80
frame #8: 0x25a09700 UIKit-[UIControl sendAction:to:forEvent:] + 64
frame #9: 0x259f161e UIKit-[UIControl _sendActionsForEvents:withEvent:] + 446
frame #10: 0x25a09050 UIKit-[UIControl touchesEnded:withEvent:] + 616
frame #11: 0x259c2fc6 UIKit_UIGestureRecognizerUpdate + 10934
frame #12: 0x25a01e10 UIKit-[UIWindow _sendGesturesForEvent:] + 904
frame #13: 0x25a015c2 UIKit-[UIWindow sendEvent:] + 622
frame #14: 0x259d2118 UIKit-[UIApplication sendEvent:] + 204
frame #15: 0x259d0756 UIKit_UIApplicationHandleEventQueue + 5134
frame #16: 0x217fd256 CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
frame #17: 0x217fce46 CoreFoundation__CFRunLoopDoSources0 + 454
frame #18: 0x217fb1ae CoreFoundation__CFRunLoopRun + 806
frame #19: 0x2174dbb8 CoreFoundationCFRunLoopRunSpecific + 516
frame #20: 0x2174d9ac CoreFoundationCFRunLoopRunInMode + 108
frame #21: 0x229c7af8 GraphicsServicesGSEventRunModal + 160
frame #22: 0x25a39fb4 UIKitUIApplicationMain + 144
frame #23: 0x0009a1ec MyAppmain(argc=1, argv=0x0108bb24) + 108 at main.m:17
我一直在使用的更新区块(beginUpdates)和动画块,但妄图。 任何帮助表示赞赏。
我试过这个没有任何成功。对不起,我应该在上面提到它。 – user3752049