CPApplicationDelegate.GetViewController 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
UIViewController检索由 标识的 restorationIdentifierComponents
。
[Foundation.Export("application:viewControllerWithRestorationIdentifierPath:coder:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual UIKit.UIViewController GetViewController(UIKit.UIApplication application, string[] restorationIdentifierComponents, Foundation.NSCoder coder);
abstract member GetViewController : UIKit.UIApplication * string[] * Foundation.NSCoder -> UIKit.UIViewController
override this.GetViewController : UIKit.UIApplication * string[] * Foundation.NSCoder -> UIKit.UIViewController
参数
- application
- UIApplication
对调用此委托方法的 UIApplication 的引用。
- restorationIdentifierComponents
- String[]
标识所需视图控制器的路径的标识符数组,该路径应为最后一个。
- coder
- NSCoder
返回
- 属性
注解
若要检索特定的 UIViewController, restorationIdentifierComponents
必须包含所需视图控制器及其所有上级在视图控制器层次结构中的标识符。 最后一个值应为所需视图的值,而第一个值应为视图控制器层次结构的根。