UIStateRestoration.ViewControllerStoryboardKey Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the value associated with the constant UIStateRestorationViewControllerStoryboardKey
[Foundation.Field("UIStateRestorationViewControllerStoryboardKey", "UIKit")]
public static Foundation.NSString ViewControllerStoryboardKey { get; }
member this.ViewControllerStoryboardKey : Foundation.NSString
Property Value
- Attributes
Remarks
Application developers who wish to implement state restoration would use this method in the following manner:
[Adopts ("UIViewControllerRestoration")]
class MyUIViewController : UIViewController {
[Export ("viewControllerWithRestorationIdentifierPath:")]
static UIViewController FromIdentifierPath (string [] identifierComponents, NSCoder coder)
{
var sb = (UIStoryboard) coder.DecodeObject (UIStateRestoration.ViewControllerStoryboardKey);
if (sb != null){
var vc = (MyUIViewController) sb.InstantiateViewController ("MyViewController");
vc.RestorationIdentifier = identifierComponents [identifierComponents.Length-1];
vc.RestorationClass = Class.GetHandle (typeof (MyViewController));
}
}
}