我有一个基于 UISplitView 的应用程序,在详细视图中有一个 UIWebVIew。当用户在根视图的表中选择新行时,我想让它更改其内容。我在 DetailViewController 中尝试过这样的:
- (void)setDetailItem:(id)newDetailItem {
extern NSString *rowname;
if (detailItem != newDetailItem) {
[detailItem release];
detailItem = [newDetailItem retain];
// Update the view.
if ([rowname isEqualToString:@"About"])
[self loadFile:@"About.rtf"];
if ([rowname isEqualToString:@"Square"])
[self loadFile:@"Square.rtf"];
//And so on with every UITableView element from the RootView
if (popoverController != nil) {
[popoverController dismissPopoverAnimated:YES];
}
}
}
请帮帮我!提前致谢!