eg:
swift跳转
let picEditViewController = UIStoryboard.init(name: "InsProjectMain", bundle: nil).instantiateViewController(withIdentifier: "PicEditViewController") as! PicEditViewController
picEditViewController.editImage = selectedImage
picEditViewController.modalPresentationStyle = .fullScreen
self.present(picEditViewController, animated: true, completion:nil)
swift返回上一级
self.dismiss(animated: true, completion: nil)
swift返回两级
self.presentingViewController?.dismiss(animated: false, completion: nil)
self.presentingViewController?.dismiss(animated: true, completion: nil)
oc跳转
UIStoryboard *sb =[UIStoryboard storyboardWithName:@"InsProjectMain" bundle:nil];
ShareViewController *sahreVC = [sb instantiateViewControllerWithIdentifier:@"ShareController"];
sahreVC.videoStr = videoPath;
//模态弹窗全屏
sahreVC.modalPresentationStyle = 0;
[controller presentViewController:sahreVC animated:YES completion:nil];
oc返回上一级
[self dismissViewControllerAnimated:YES completion:^{}];
网友评论