1、使用时,一般的打印信息不会报错,一旦需要跳转到相应的控制器,就需要加上大括号,如下所示

-(void)btnClick:(UIButton *)button
{
    switch (button.tag) {
        case 0:
        {
           // 修改昵称
            LLNameResetController * nameVc = [[LLNameResetController alloc]init];
            [self.navigationController pushViewController:nameVc animated:YES];
           break;
        }
        case 1:
            NSLog(@"-----2");
            break;
        case 2 :
            NSLog(@"-----3");
            break;
        case 3:
            NSLog(@"-----4");
            break;
        case 4:
            NSLog(@"-----5");
            break;
        default:
            break;
    }
    
    
}

 

相关文章:

  • 2021-07-14
  • 2021-10-28
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2021-06-05
  • 2021-12-06
猜你喜欢
  • 2021-12-03
  • 2022-12-23
  • 2021-11-21
  • 2021-12-15
  • 2021-04-26
  • 2021-07-15
  • 2022-12-23
相关资源
相似解决方案