How to navigate from one view controller to another view controller on button click?

前端 未结 7 2023
遥遥无期
遥遥无期 2021-01-04 13:48

I am new to iOS Application development, please help me how can I go from one view controller to another view controller on button click?

相关标签:
7条回答
  • 2021-01-04 14:22

    Try this code:

    - (IBAction)btnJoin:(id)sender {
    
       SecondViewController *ViewController2 = [self.storyboardinstantiateViewControllerWithIdentifier:@"SecondViewController"];
       [self.navigationController pushViewController: ViewController2 animated:YES];
    
    }
    
    0 讨论(0)
提交回复
热议问题