Skip to content

Latest commit

 

History

History
55 lines (43 loc) · 1.63 KB

File metadata and controls

55 lines (43 loc) · 1.63 KB
pcx_content_type reference
title RtkLeaveDialog
description API reference for RtkLeaveDialog component (iOS Library)
products
realtime

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)