我无法使用 UIScrollView 诊断崩溃
UIKit
-[UIScrollView setContentOffset:]
异常类型:EXC_BAD_ACCESS
代码 KERN_INVALID_ADDRESS
在 0xe0000008
com.apple.main-thread Crashed
0 libobjc.A.dylib objc_msgSend + 15
1 UIKit -[UIScrollView setContentOffset:] + 618
2 UIKit -[UITableView setContentOffset:] + 330
3 UIKit -[UIScrollView(Static) _adjustContentOffsetIfNecessary] + 1474
4 UIKit -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:tramplingDragFlags:] + 414
5 UIKit -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:] + 30
6 UIKit -[UIScrollView removeFromSuperview] + 30
7 ... UIKit -[UIView dealloc] + 296
8 UIKit -[UIView dealloc] + 296
9 libobjc.A.dylib (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 168
10 CoreFoundation _CFAutoreleasePoolPop + 16
11 CoreFoundation __CFRunLoopRun + 1296
12 CoreFoundation CFRunLoopRunSpecific + 356
13 CoreFoundation CFRunLoopRunInMode + 104
14 GraphicsServices GSEventRunModal + 74
15 UIKit UIApplicationMain + 1120
16 iTV Shows main.m line 12
我遇到了同样的问题。在 dealloc
方法中将 TableView
和 ScrollView
委托(delegate)(或您可能拥有的任何其他委托(delegate))设置为 nil 解决了这个问题。
- (void)dealloc {
self.tableView.delegate = nil;
self.tableView.dataSource = nil;
}
关于ios - 崩溃 UIScrollView EXC_BAD_ACCESS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15781637/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |