UIKit.UIStateRestoration.ViewControllerStoryboardKey Property
Represents the value associated with the constant UIStateRestorationViewControllerStoryboardKey

Syntax

[Foundation.Field("UIStateRestorationViewControllerStoryboardKey", "UIKit")]
public static Foundation.NSString ViewControllerStoryboardKey { get; }

Value

Remarks

Application developers who wish to implement state restoration would use this method in the following manner:

C# Example

          [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));
                }
             }
          }

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0