【发布时间】:2011-12-14 04:13:22
【问题描述】:
在我的 iPad 应用程序中,我以编程方式添加了 UISearchBar。
当我单击 searchBar 时,会出现一个包含数据的表格。当我点击表格中的行时,它应该导航到新视图
例如:
当我点击“依赖”时,它应该会显示一个新视图。关于如何实现这一点的任何建议?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
ContentController *detailview = [[ContentController alloc] initWithNibName:@"ContentController" bundle:nil];
detailview.detailString = [NSString stringWithFormat:@"%d",indexPath.row];
[self.view addSubView:detailView];
[detailview release];
}
所以我添加了上面的代码。我还需要做什么吗?
【问题讨论】:
标签: iphone ipad uitableview navigation