2011年1月20日 星期四

[iOS Dev] UITableView換頁時隱藏UITabBar

在換頁的didSelectRowAtIndexPath method中加入:

targetViewController.hidesBottomBarWhenPushed = YES;


Sample
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
 UIViewController *targetViewController = [[menuList objectAtIndex: indexPath.row] objectForKey:kViewControllerKey];
 targetViewController.hidesBottomBarWhenPushed = YES;
 [self.navigationController pushViewController:targetViewController animated:YES];
 [targetViewController release];
}


See Also
iLessons iLearned: How to Hide UITabBar
Related Posts Plugin for WordPress, Blogger...