CPApplicationDelegate.GetViewController 方法

定义

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

返回

属性

注解

若要检索特定的 UIViewControllerrestorationIdentifierComponents 必须包含所需视图控制器及其所有上级在视图控制器层次结构中的标识符。 最后一个值应为所需视图的值,而第一个值应为视图控制器层次结构的根。

适用于