logo
On this page

Switch a whiteboard


This document describes how to switch the displayed whiteboard.

Prerequisites

Creat a whiteboard by referring to Create a super board.

Listen for remote whiteboard switching

[ZegoSuperBoardManager sharedInstance].delegate = self;

- (void)onRemoteSuperBoardSubViewSwitched:(NSString *)uniqueID
{
    // Receive remote switching of the whiteboard. No operation is required. 
    // The UI can be updated according to data in [ZegoSuperBoardManager sharedInstance].superBoardView.currentSuperBoardSubView. For example, the whiteboard name displayed currently can be updated.
}

Proactively switch a whiteboard


ZegoSuperBoardView *superBoardView = [ZegoSuperBoardManager sharedInstance].superBoardView;

// Switch a whiteboard.
// subViewModel is a model in the whiteboard sharing list [ZegoSuperBoardManager sharedInstance].superBoardSubViewModelList.
[superBoardView switchSuperBoardSubView:subViewModel.uniqueID complete:^(ZegoSuperBoardError errorCode) {
        // Receive the callback of whiteboard switching.
        // The UI can be updated according to data in [ZegoSuperBoardManager sharedInstance].superBoardView.currentSuperBoardSubView. For example, the whiteboard displayed currently can be updated.
     if (errorCode == ZegoSuperBoardSuccess) {
            /** Whiteboard switching succeeded. */
     } else {
            /** Whiteboard switching failed. */
     } 
}];

Previous

Zoom in or out on a whiteboard

Next

Get the whiteboard list

On this page

Back to top