更新时间:2024-07-30 GMT+08:00

共享工具栏更多菜单定制

screenShareToolbarMoreMenuItems

接口描述

该接口用于构建共享工具栏更多菜单选项

图1 共享工具栏更多菜单选项定制位置

注意事项

方法定义

1
- (nullable NSArray <HWMMenuItemModel *> *)screenShareToolbarMoreMenuItems;

参数描述

返回值

示例代码

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
// 构建共享工具栏更多菜单选项
- (nullable NSArray <HWMMenuItemModel *> *)screenShareToolbarMoreMenuItems {
    // 网络检测
    HWMMenuItemModel *networkDetectionItem = [HWMMenuItemModel defaultNetworkDectectionModel];
    // 自定义选项
    HWMMenuItemModel *customItem = [[HWMMenuItemModel alloc]init];
    customItem.title = @"自定义选项";
    customItem.image = [NSImage imageNamed:@"icon-customize-select-normal"];
    HWMMenuItemModel *subItem1 = [[HWMMenuItemModel alloc]init];
    subItem1.title = @"子菜单项1";
    HWMMenuItemModel *subItem2 = [[HWMMenuItemModel alloc]init];
    subItem2.title = @"子菜单项2";
    customItem.submenus = @[subItem1,subItem2];
    // 离开
    HWMMenuItemModel *leaveItem = [HWMMenuItemModel defaultLeaveMeetingModel];

    return @[networkDetectionItem, customItem, leaveItem];
}