viewDidLoad
TypeScriptviewDidLoad(): Promise<void>Swift declaration@MainActor override dynamic func viewDidLoad()Notifies the view controller that the system added a view to a view hierarchy.
class · iOS 15.4+ · SDK 27.1
@MainActor @objc class GroupActivitySharingControllerAn iOS view controller that displays the system interface for starting an activity, and optionally starts a FaceTime call for that activity. A ``GroupActivitySharingController`` helps you start a SharePlay activity, even when a FaceTime call isn't currently active. When presented, the view controller prompts the person to start the activity you provided. If no FaceTime call is active, the view controller also displays a people picker to let the person select the participants for the activity. When they choose to start the activity, the view controller automatically starts the FaceTime call as needed and joins your app to the activity. If your app’s interface includes controls to start SharePlay activities, present this view controller in response to interactions with those controls. Initialize the ``GroupActivitySharingController`` object with the activity you want to start. After you present it, the view controller handles all further interactions. It manages the interface that appears onscreen and responds when someone chooses to start or cancel the activity. It starts the FaceTime call if one isn’t currently active. It also dismisses itself and returns control back to your app, updating its ``result`` property to let you know what happened.
viewDidLoad(): Promise<void>Swift declaration@MainActor override dynamic func viewDidLoad()Notifies the view controller that the system added a view to a view hierarchy.
viewWillAppear(animated: boolean): Promise<void>Swift declaration@MainActor override dynamic func viewWillAppear(_ animated: Bool)Notifies the view controller that the system is going to add a view to a view hierarchy.
get modalPresentationStyle(): Promise<_UIKit_UIModalPresentationStyle>Swift declaration@MainActor override dynamic var modalPresentationStyle: UIModalPresentationStyle { get set }The presentation style for the view controller. This property always sets the presentation style for the view controller to <doc://com.apple.documentation/documentation/uikit/uimodalpresentationstyle/pagesheet>.
setModalPresentationStyle(value: _UIKit_UIModalPresentationStyle): Promise<void>Swift declaration@MainActor override dynamic var modalPresentationStyle: UIModalPresentationStyle { get set }The presentation style for the view controller. This property always sets the presentation style for the view controller to <doc://com.apple.documentation/documentation/uikit/uimodalpresentationstyle/pagesheet>.
get result(): Promise<GroupActivitySharingResult>Swift declaration@MainActor var result: GroupActivitySharingResult { get async }The result of a request to share a group activity. Use this property to perform actions related to the starting of the activity. You don’t need to start the activity itself, since the view controller automatically joins your app to the activity when the result is ``GroupActivitySharingResult/success``.
2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
GroupActivitySharingController.init(_:)
This declaration needs Swift generic type arguments. (no canonical witness for ActivityType)
GroupActivitySharingController.init(preparationHandler:)
This declaration needs Swift generic type arguments. (no canonical witness for ActivityType)