有谁知道什么会导致这些崩溃?请参阅附图.
一些应用程序屏幕使用UIWebVIEw显示内容 – 我认为问题出在那里.
首先,您应该考虑webVIEw.delegate = nil.
但是哪里 ??
我的经验:
- (voID)dealloc{ /* important Before releasing an instance of UIWebVIEw for which you have set a delegate,you must first set the UIWebVIEw delegate property to nil before disposing of the UIWebVIEw instance. This can be done,for example,in the dealloc method where you dispose of the UIWebVIEw. */ if (_webVIEw.loading) { [self.webVIEw stopLoading]; } _webVIEw.delegate = nil;}
if the
VIEwController
is a child of a anotherVIEwController
,you can
trigger the removal of theVIEwController
‘s vIEw from the parent
VIEwController
‘s vIEw with an animation. At the same time,you can
remove theVIEwController
from its parent and nil out its reference.
at this pointVIEwController
will be nil andvIEwWilldisappear
will
never be called,meaning **the WebVIEw delegate will never be cleaned up
**
Use dealloc and ensure that yourWebVIEw
is always cleaned up.
其他优秀的链接
ios:EXC_BAD_ACCESS for Webview delegate
以上是内存溢出为你收集整理的iOS:WebKitLegacy崩溃全部内容,希望文章能够帮你解决iOS:WebKitLegacy崩溃所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)