Skip to main content

Group Administrator Page

tip

This feature is supported starting from version 5.12.2.

The group administrator page class is RCGroupManagerListController.

Initialization

Call the initialization method of the RCGroupManagerListController class to construct the group administrator page. Note that you need to create an RCGroupManagerListViewModel object as the business logic processing module for RCGroupManagerListController.

Parameter Description

RCGroupManagerListController description:

ParameterTypeDescription
viewModelRCGroupManagerListViewModelThe business logic processing module for RCGroupManagerListController.

RCGroupManagerListViewModel description:

ParameterTypeDescription
groupIdNSStringThe group ID.

Example Code

NSString *groupId = @"Group ID";
RCGroupManagerListViewModel *viewModel = [RCGroupManagerListViewModel viewModelWithGroupId:groupId];
RCGroupManagerListController *vc = [[RCGroupManagerListController alloc] initWithViewModel:viewModel];
[viewController.navigationController pushViewController:vc animated:YES];

Customization

You can customize the click events on the group administrator page through the RCGroupManagerListViewModel delegate methods:

1. Add RCGroupManagerListViewModel Delegate

NSString *groupId = @"Group ID";
RCGroupManagerListViewModel *viewModel = [RCGroupManagerListViewModel viewModelWithGroupId:groupId];
/// Set the delegate
viewModel.delegate = self;

2. Implement RCGroupManagerListViewModel Delegate Methods

Customize cell click events:

- (BOOL)  groupManagers:(RCGroupManagerListViewModel *)viewModel
viewController:(UIViewController*)viewController
tableView:(UITableView *)tableView
didSelectRow:(NSIndexPath *)indexPath
cellViewModel:(RCBaseCellViewModel *)cellViewModel {

return YES;///YES: SDK won't handle it, NO: SDK handles it.
}

Customize the event before removing administrators:

- (BOOL)groupManagersWillRemove:(NSString *)groupId
removeUserIds:(NSArray <NSString *>*)removeUserIds
viewController:(UIViewController*)viewController {

return YES;///YES: SDK won't handle it, NO: SDK handles it internally.
}