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

前端 未结 7 2104
遥遥无期
遥遥无期 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:06

    YourSecondViewcontroller *temp = [[YourSecondViewcontroller alloc]initWithNibName:@"YourSecondViewcontroller" bundle:nil];
    [self.navigationController pushViewController:temp animated:YES];
    

    //or

    [self presentModalViewController:temp animated:YES];
    

    Visit this reference for tutorial and working demo code

    Hope, this will help you..enjoy

提交回复
热议问题