这样一句话:
PersonMainPageVC *pageVC = [[PersonMainPageVC alloc] init];
pageVC.hidesBottomBarWhenPushed = YES;
DEMO:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0 && indexPath.row == 0) {
[self Login];
}
if (indexPath.section == 1) {
if(indexPath.row== 0){
PerInfomation *infoVC = [[PerInfomation alloc] initWithNibName:@"PerInfomation" bundle:nil];
infoVC.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:infoVC animated:YES];
}else if (indexPath.row == 1){
if (!userNameMy) {
LoginVC *logVC = [[LoginVC alloc] init];
[self.navigationController pushViewController:logVC animated:YES];
return ;
}
PersonMainPageVC *pageVC = [[PersonMainPageVC alloc] init];
pageVC.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:pageVC animated:YES];
}else if (indexPath.row == 2){
if (!userNameMy) {
LoginVC *logVC = [[LoginVC alloc] init];
[self.navigationController pushViewController:logVC animated:YES];
return ;
}
VIPSortCourseVC *vipVC = [[VIPSortCourseVC alloc] init];
vipVC.hidesBottomBarWhenPushed = YES;
vipVC.isMyClass = YES;
vipVC.categoryID = @"";
vipVC.lectureType = @"3";
vipVC.name = @"我的课程";
[self.navigationController pushViewController:vipVC animated:YES];
}else if (indexPath.row == 3){
//我的报名
MyApplyViewController *applyVC = [[MyApplyViewController alloc]init];
[self.navigationController pushViewController:applyVC animated:YES];
applyVC.hidesBottomBarWhenPushed = YES;
}else if (indexPath.row == 4){
//钱包
MyPurseVC *myPurseVC = [[MyPurseVC alloc] initWithNibName:@"MyPurseVC" bundle:nil];
myPurseVC.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:myPurseVC animated:YES];
}else if (indexPath.row == 5) {
//设置
SettingVC *settingVC = [[SettingVC alloc] initWithNibName:@"SettingVC" bundle:nil];
settingVC.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:settingVC animated:YES];
}
}
}