Help Center/ Meeting/ Client SDK Reference/ macOS SDK/ APIs/ UI Customization/ Customizing the More Menu on the Sharing Toolbar
Updated on 2024-07-30 GMT+08:00

Customizing the More Menu on the Sharing Toolbar

screenShareToolbarMoreMenuItems

API Description

This API is used to customize the options in the More menu on the sharing toolbar.

Figure 1 Options in the More menu on the sharing toolbar

Precautions

None

Method Definition

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

Parameter Description

None

Return Values

None

Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
// Customize the options in the More menu on the sharing toolbar.
- (nullable NSArray <HWMMenuItemModel *> *)screenShareToolbarMoreMenuItems {
    // Network detection
    HWMMenuItemModel *networkDetectionItem = [HWMMenuItemModel defaultNetworkDectectionModel];
    // Custom option
    HWMMenuItemModel *customItem = [[HWMMenuItemModel alloc]init];
    customItem.title = @"Custom option";
    customItem.image = [NSImage imageNamed:@"icon-customize-select-normal"];
    HWMMenuItemModel *subItem1 = [[HWMMenuItemModel alloc]init];
    subItem1.title = @"Sub-option 1";
    HWMMenuItemModel *subItem2 = [[HWMMenuItemModel alloc]init];
    subItem2.title = @"Sub-option 2";
    customItem.submenus = @[subItem1,subItem2];
    // Leave
    HWMMenuItemModel *leaveItem = [HWMMenuItemModel defaultLeaveMeetingModel];

    return @[networkDetectionItem, customItem, leaveItem];
}