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