正如您在标题中看到的那样,我遇到了一个小问题。我正在将 MWParser 用于 RSS 提要。我编辑了当您单击 RSS 标题时的代码,它会在应用内浏览器中打开。这是代码:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (_webViewController == nil) {
self.webViewController = [[[WebViewController alloc] initWithNibName:@"WebViewController" bundle:[NSBundle mainBundle]] autorelease];
}
MWFeedItem *entry = [parsedItems objectAtIndex:indexPath.row];
_webViewController.entry = entry;
[self.navigationController pushViewController:_webViewController animated:YES];
// Deselect
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
但是,我收到此崩溃消息:
2013-02-11 18:21:15.644 GlennKessler[24209:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/Hugo/Library/Application Support/iPhone Simulator/6.1/Applications/7F35D6C0-BFBE-4CD9-A1CE-7DC54CD6B249/GlennKessler.app> (loaded)' with name 'WebViewController''
据我所知,发生这种情况是因为我使用的是 Storyboard,而不是 NIB。如何让它在故事板中打开运行 WebViewController 中代码的视图?谢谢!