Generic Class

WKHostingController

A WatchKit interface controller which hosts a SwiftUI view hierarchy.

Declaration

class WKHostingController<Body> : WKInterfaceController where Body : View

Topics

Initializers

Instance Properties

var body: Body

The root view of the view hierarchy to display.

var hashValue: Int

The hash value.

Instance Methods

func hash(into: inout Hasher)

Hashes the essential components of this value by feeding them into the given hasher.

func setNeedsBodyUpdate()

Invalidates the curren body and triggers a body update during the next update cycle.

func updateBodyIfNeeded()

Updates the body immediately, if updates are pending.

Operator Functions

static func == (NSObject, NSObject) -> Bool

Returns a Boolean value indicating whether two values are equal. NSObject implements this by calling lhs.isEqual(rhs).

Relationships

Conforms To

See Also

WatchKit Hosting

protocol WKInterfaceObjectRepresentable

A view that represents a WatchKit interface object.

Beta
class WKUserNotificationHostingController

A WatchKit user notification interface controller which hosts a SwiftUI view hierarchy.

Beta
struct WKInterfaceObjectRepresentableContext

The context in which updates to an associated WatchKit interface object take place.

Beta
enum DigitalCrownRotationalSensitivity

The amount of Digital Crown rotation needed to move between two integer numbers.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software