跳转到内容
搜索文档

RtkControlBar

最后更新 查看 MarkdownAgent 设置

包含"更多"菜单按钮和"结束通话"按钮的基础控制栏视图。 作为 RtkMeetingControlBarRtkWebinarControlBar 的基础。

初始化参数

参数 类型 必填 默认值 描述
meeting RealtimeKitClient - RealtimeKit 客户端实例
delegate RtkTabBarDelegate? - 处理标签栏交互的委托
presentingViewController UIViewController - 用于呈现模态界面的视图控制器
appearance RtkControlBarAppearance RtkControlBarAppearanceModel() 控制栏的外观配置
settingViewControllerCompletion (() -> Void)? nil 设置视图控制器关闭时调用的闭包
onLeaveMeetingCompletion (() -> Void)? nil 参会者离开会议时调用的闭包

属性

属性 类型 必填 默认值 描述
moreButton RtkMoreButtonControlBar - - "更多"菜单按钮(只读)
endCallButton RtkEndMeetingControlBarButton - - "结束通话"按钮

使用示例

基本用法

import RealtimeKitUI

let controlBar = RtkControlBar(
    meeting: rtkClient,
    delegate: self,
    presentingViewController: self
)
view.addSubview(controlBar)

带完成处理器

import RealtimeKitUI

let controlBar = RtkControlBar(
    meeting: rtkClient,
    delegate: self,
    presentingViewController: self,
    onLeaveMeetingCompletion: {
        self.dismiss(animated: true)
    }
)
view.addSubview(controlBar)

这篇文档对您有帮助吗?