通常在两个tableview中间的视图切换需要两个方法,
-(void)doBack
{
[self.navigationController popToRootViewControllerAnimated:YES];
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
RootDetailViewController * chaZi=[[RootDetailViewController alloc]init];
NSString * stAr=[_headerArray objectAtIndex:indexPath.section];
Pinyin * bss=[[Pinyin selectPinyinByType:stAr]objectAtIndex:indexPath.row];
chaZi.strText=bss.pinyin;
//NSLog(@"bss=%@",bss.title);
[self.navigationController pushViewController:chaZi animated:YES];
}
在这个推出的方法里 RootDetailViewController是下一个视图,然后给所推出的视图命名。实现完整推出