To Present , Dismiss & Push, Pop viewControllers...
// To present VC
ViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"ViewController"];
controller.typeString=@"toNextVC"; // type string to pass something
[self presentViewController:controller animated:YES completion:nil];
// To dissmiss VC
[self dismissViewControllerAnimated:YES completion:nil];
// To push VC
ViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"ViewController"];
controller.typeString=@"toNextVC"; // type string to pass something
[self.navigationController pushViewController:controller animated:YES];
// To pop VC
[self.navigationController popViewControllerAnimated:YES];
No comments:
Post a Comment