Skip to content

RtkEndMeetingControlBarButton

A control bar button that ends or leaves the meeting. Optionally displays a confirmation dialog before ending the meeting.

Initializer parameters

ParameterTypeRequiredDefaultDescription
meetingRealtimeKitClient-The RealtimeKit client instance
alertViewControllerUIViewController-View controller used to present the confirmation alert
onClick((RtkEndMeetingControlBarButton, RtkLeaveDialog.RtkLeaveDialogAlertButtonType) -> Void)?nilClosure called after the user confirms leaving or ending the meeting, receiving the button and the selected action type
appearanceRtkControlBarButtonAppearance-Appearance configuration for the button

Properties

PropertyTypeRequiredDefaultDescription
shouldShowAlertOnClickBooltrueWhether to show a confirmation alert before ending the meeting

Usage Examples

Basic Usage

Swift
import RealtimeKitUI
let endButton = RtkEndMeetingControlBarButton(
meeting: rtkClient,
alertViewController: self
)
view.addSubview(endButton)

Without confirmation dialog

Swift
import RealtimeKitUI
let endButton = RtkEndMeetingControlBarButton(
meeting: rtkClient,
alertViewController: self,
onClick: { button, actionType in
print("Action: \(actionType)")
}
)
endButton.shouldShowAlertOnClick = false
view.addSubview(endButton)