WKInterfaceController.PresentController Method

Definition

Overloads

PresentController(String[], NSObject[])

Modally presents a page-based UI with the specified WKInterfaceControllers.

PresentController(String[], String[])

Modally presents a page-based UI with the specified WKInterfaceControllers.

PresentController(String, String)

Modally presents a WKInterfaceController.

PresentController(String, NSObject)

Modally presents a WKInterfaceController.

PresentController(String[], NSObject[])

Modally presents a page-based UI with the specified WKInterfaceControllers.

[Foundation.Export("presentControllerWithNames:contexts:")]
[ObjCRuntime.ThreadSafe(false)]
public virtual void PresentController (string[] names, Foundation.NSObject[] contexts);
abstract member PresentController : string[] * Foundation.NSObject[] -> unit
override this.PresentController : string[] * Foundation.NSObject[] -> unit

Parameters

names
String[]

In the Storyboard, the values of the Identifier for the WKInterfaceController objects to be presented.

contexts
NSObject[]

Information for the WKInterfaceControllers to be presented. May be null.

This parameter can be null.

Attributes

Remarks

The Title of the presented page-based UI will be "Cancel" unless the app dev changes it with SetTitle(String).

This method must be called from the Watch Kit Extension's main thread. (See InvokeOnMainThread(Selector, NSObject) and BeginInvokeOnMainThread(Selector, NSObject))

This can be used from a background thread.

PresentController(String[], String[])

Modally presents a page-based UI with the specified WKInterfaceControllers.

public void PresentController (string[] names, string[] contexts);
member this.PresentController : string[] * string[] -> unit

Parameters

names
String[]

In the Storyboard, the values of the Identifier for the WKInterfaceController objects to be presented.

contexts
String[]

Information for the WKInterfaceControllers to be presented. May be null.

Remarks

The Title of the presented page-based UI will be "Cancel" unless the app dev changes it with SetTitle(String).

This method must be called from the Watch Kit Extension's main thread. (See InvokeOnMainThread(Selector, NSObject) and BeginInvokeOnMainThread(Selector, NSObject))

PresentController(String, String)

Modally presents a WKInterfaceController.

public void PresentController (string name, string context);
member this.PresentController : string * string -> unit

Parameters

name
String

In the Storyboard, the value of the Identifier for the WKInterfaceController to be presented.

context
String

Information for the WKInterfaceController to be presented. May be null.

Remarks

This method must be called from the Watch Kit Extension's main thread. (See InvokeOnMainThread(Selector, NSObject) and BeginInvokeOnMainThread(Selector, NSObject))

PresentController(String, NSObject)

Modally presents a WKInterfaceController.

[Foundation.Export("presentControllerWithName:context:")]
[ObjCRuntime.ThreadSafe(false)]
public virtual void PresentController (string name, Foundation.NSObject context);
abstract member PresentController : string * Foundation.NSObject -> unit
override this.PresentController : string * Foundation.NSObject -> unit

Parameters

name
String

In the Storyboard, the value of the Identifier for the WKInterfaceController to be presented.

context
NSObject

Information for the WKInterfaceController to be presented. May be null.

This parameter can be null.

Attributes

Remarks

This method must be called from the Watch Kit Extension's main thread. (See InvokeOnMainThread(Selector, NSObject) and BeginInvokeOnMainThread(Selector, NSObject))

This can be used from a background thread.

Applies to