跳转到内容
搜索文档

RtkEndMeetingControlBarButton

最后更新 查看 MarkdownAgent 设置

用于结束或离开会议的控制栏按钮。 可在结束会议前选择性地显示确认对话框。

初始化参数

参数 类型 必填 默认值 描述
meeting RealtimeKitClient - RealtimeKit 客户端实例
alertViewController UIViewController - 用于呈现确认弹窗的视图控制器
onClick ((RtkEndMeetingControlBarButton, RtkLeaveDialog.RtkLeaveDialogAlertButtonType) -> Void)? nil 用户确认离开或结束会议后调用的闭包,接收按钮和所选操作类型
appearance RtkControlBarButtonAppearance - 按钮的外观配置

属性

属性 类型 必填 默认值 描述
shouldShowAlertOnClick Bool true 结束会议前是否显示确认弹窗

使用示例

基本用法

import RealtimeKitUI

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

不显示确认对话框

import RealtimeKitUI

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

这篇文档对您有帮助吗?