我有ios应用程序。一些视图控制器包含 webviews。一切都很好,除了一个问题:
当应用程序启动并且我有几分钟不使用它然后继续我的工作时,它可以正常工作,但是当我想用 webview 加载 viewcontroller 时,它会因SIGKILL错误而崩溃。休息一段时间后,其他视图控制器没有问题。这是我用于 webviews 的代码:
_webView = [[UIWebView alloc] initWithFrame:self.view.bounds)];
[self.view addSubview:_webView];
_webView.userInteractionEnabled = NO;
[_webView release];
// here is the local page, the same happens if i load internet page..
NSString *path = [[NSBundle mainBundle] pathForResource:@"localpage" ofType:@"html"];
_url = [NSURL fileURLWithPath:path];
[_webView loadRequest:[NSURLRequest requestWithURL:_url]];
所以问题是为什么应用程序崩溃只是在一些中断后尝试加载带有 webviews 的视图控制器?
谢谢。