1
내 탐색 컨트롤러에 일련의보기를 푸시하지만 일부 탐색 옵션에서는 긴 목록에 추가하고 싶지 않지만 표시하고 싶습니다. 스택의 앞면과 나머지 부분을 제거하십시오. . 내 사용자가 내가 그 탐색 컨트롤러 스택의 유일한되고 싶어하고에 밀어있는 MyInfoViewController을 클릭하면보기 컨트롤러를 ipad의 탐색 컨트롤러 스택 앞쪽으로 밀어 넣음
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NavigationTestAppDelegate *appDelegate = (NavigationTestAppDelegate *) [[UIApplication sharedApplication] delegate];
UIViewController *targetController = nil;
switch (indexPath.row) {
case 0:
targetController = [[ClientListViewController alloc] init];
targetController.title = @"Clients";
break;
case 1:
break;
case 2:
targetController = [[MyInfoViewController alloc] init];
targetController.title = @"My Information";
break;
default:
break;
}
if ([targetController isKindOfClass:[ClientListViewController class]])
{
[[self navigationController] pushViewController:targetController animated:YES];
} else {
if (targetController)
[[appDelegate.homeViewController navigationController] pushViewController:targetController animated:YES];
if (appDelegate.popoverController)
[appDelegate.popoverController dismissPopoverAnimated:YES];
}
[targetController release];
}