IOS--跳转方式两种

时间:2023-03-09 03:58:03
IOS--跳转方式两种

带导航栏的Push跳转:

FloatPassViewController *floatpass = [self.storyboard instantiateViewControllerWithIdentifier:@"floatpass"];
[self.navigationController pushViewController:floatpass animated:YES];

不带导航栏的present跳转:

HomeViewController *home = [self.storyboard instantiateViewControllerWithIdentifier:@"home"];
//[self.navigationController pushViewController:home animated:YES];
[self presentViewController:home animated:YES completion:^{
NSLog(@"登录成功");
}];