0
我有一个收藏夹弹出窗口和一个webView。当你在popover的tableview中选择一个单元格时,webview应该加载这个URL,但是我得到了一个SIGABRT或者一个BAD_ACCESS。无法从弹出窗口加载WebView中的URL
下面是一些代码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (tableView == favoritesTable1) {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
textField.text = cell.textLabel.text;
[web loadRequest:[[NSURLRequest alloc] initWithURL:[[NSURL alloc] initWithString:cell.textLabel.text]]];
[cell release];
[favoritesTable1 reloadData];
}
}
我想是这样的,但完整的工作:http://cl.ly/3O2y1S3b3d031L2C122M
PS:本酥料饼是从哪儿web视图设置相同类的新的viewController。
对不起,我发布了错误的代码。在两分钟后,我会发布didSelectRowAtIndexPath方法。 – adr 2012-04-17 21:00:27