iOS三种页面跳转方法

// 第一种通过给页面设置tag值 
// 把tag值为3000的view带到最前面 也就是显示在屏幕上;
[self.window bringSubviewToFront:[self.window viewWithTag:3000]];
// 把tag值为2000的view送到最后, 让他下面的view显示
[self.window sendSubviewToBack:[self.window viewWithTag:2000]];

/**************************************华丽分割线********************************************/
// 第二种 模态跳转

- (void)isClick:(UIButton *)button {
    // 模态跳转
    // 1. 创建目标页面的对象
    SecondViewController *secVC = [[SecondViewController alloc]init];
    // 2. 设置跳转的动画样式
    secVC.modalTransitionStyle = 0;
    // 3. 向目标页面进行跳转
    [self presentViewController:secVC animated:YES completion:^{
      
        
    }];
    // 4. 内存管理
    [secVC release];
}

- (void)isCilck:(UIButton *)button {
    // 返回前一页面
    [self dismissViewControllerAnimated:YES completion:^{
    
    }];
}

/**************************************华丽分割线********************************************/

// 第三种 导航控制器跳转

- (void)buttonAction:(UIButton *)button {
    // 1. 先创建目标页面对象
    SecondViewController *secVC = [[SecondViewController alloc]init];
    // 2. 跳转
    [self.navigationController pushViewController:secVC animated:YES];
    // 3. 内存管理
    [secVC release];
    
   
}

- (void)buttonAction:(UIButton *)button {
    ThirdViewController *third = [[ThirdViewController alloc]init];
    [self.navigationController pushViewController:third animated:YES];
    
}