gpt4 book ai didi

ios - 崩溃 UIScrollView EXC_BAD_ACCESS

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:43:57 25 4
gpt4 key购买 nike

我无法诊断 UIScrollView 的崩溃

UIKit
-[UIScrollView setContentOffset:]

异常类型:EXC_BAD_ACCESS 代码 KERN_INVALID_ADDRESS at 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 方法中将 TableViewScrollView 委托(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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com