Skip to content

RtkLeaveDialog

Last updated View as MarkdownAgent setup

A dialog that presents leave and end meeting options. Displays different options based on host permissions.

Initializer parameters

Parameter Type Required Default Description
meeting RealtimeKitClient - The RealtimeKit client instance
onClick ((RtkLeaveDialogAlertButtonType) -> Void)? nil Closure called when the user selects a dialog option

Methods

Method Return Type Description
show(on:) Void Presents the leave dialog on the specified view controller

Usage Examples

Basic Usage

import RealtimeKitUI

let leaveDialog = RtkLeaveDialog(meeting: rtkClient)
leaveDialog.show(on: self)

With selection handler

import RealtimeKitUI

let leaveDialog = RtkLeaveDialog(
    meeting: rtkClient,
    onClick: { buttonType in
        switch buttonType {
        case .leaveMeeting:
            print("Leaving meeting")
        case .endMeeting:
            print("Ending meeting for all")
        default:
            break
        }
    }
)
leaveDialog.show(on: self)

Was this helpful?