在storyboard里新建一个界面....
设置identifier属性:
[img]http://dl.iteye.com/upload/attachment/0071/4964/4ab4add6-8115-33dc-a585-17a896e31307.png[/img]
然后在UITableViewController的didSelectRowAtIndexPath方法里添加如下代码:(先不考虑内存问题)
这样就可以在UITableViewController中点击一项的时候跳转到下一个界面
设置identifier属性:
[img]http://dl.iteye.com/upload/attachment/0071/4964/4ab4add6-8115-33dc-a585-17a896e31307.png[/img]
然后在UITableViewController的didSelectRowAtIndexPath方法里添加如下代码:(先不考虑内存问题)
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
TableInfoController *detail = [self.storyboard instantiateViewControllerWithIdentifier:@"tableInfoController"];
detail.title = @"详细信息";
//detail.state = [datasource objectAtIndex:indexPath.row];
//detail.capital = [states objectForKey:detail.state];
[self.navigationController pushViewController:detail animated:YES];
}
这样就可以在UITableViewController中点击一项的时候跳转到下一个界面