我要顯示Web視圖當表格單元格選定如何推動的WebView在NavigationController
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[uiWebView loadRequest:[NSURL URLWithString:@"http://www.google.com"]];
[self.navigationController pushNavigationItem:uiWebView animated:YES];
}
日誌
-[UINavigationController pushNavigationItem:animated:]: unrecognized selector sent to instance
它需要是: [UIWebView中的loadRequest:的NSURLRequest requestWithURL:[NSURL URLWithString:(的NSString *)@ 「http://www.google.com」]]]; – Sebastian