presentedViewController
和presentingViewController
是UIViewController里面的两个属性
-
presentedViewController:表示当前用户正在操作的的ViewController
-
presentingViewController:被当前ViewController遮挡住的视图
有两个类A、B,在A类跳转到B类,需要在A类中操作B类的属性或方法可以使用presentedViewController
在B类中需要操作A类中的属性或方法可以用presentingViewController
我们可以使用presentedViewController和presentingViewController进行界面之间的传递值
网友评论