Class
ZegoCreateFileConfig
Details
The interface parameters are used to construct the class, passing in the parameters needed to create the file.
- Use cases: The createFileView interface is needed in the call.
Declared in ZegoCreateFileConfig.h
Properties
fileID
nonatomic,copy NSString * fileIDID of the file
Required or not: Mandatory
- Available since: v2.0.0
ZegoCreateWhiteboardConfig
Details
The interface parameters are used to construct the class with the parameters that are passed in to create the whiteboard.
- Use cases: In the call to createWhiteboardView the interface is passed in.
Declared in ZegoCreateWhiteboardConfig.h
Properties
name
nonatomic,copy NSString * nameCreate whiteboard Is the name of the whiteboard to be set.
Required or not: Mandatory
Value range value can contain 128 bytes and can be in Both Chinese and English.
- Available since: v2.0.0
perPageWidth
nonatomic,assign NSInteger perPageWidthWidth of each whiteboard page.
Required or not: Mandatory
- Value range: Positive integer greater than 0.
- Available since: 2.0.0及以上
perPageHeight
nonatomic,assign NSInteger perPageHeightHeight of each whiteboard page.
Required or not: Mandatory
- Value range: Positive integer greater than 0.
- Available since: v2.0.0
pageCount
nonatomic,assign NSInteger pageCountTotal number of pages。
Required or not: Mandatory
- Value range: Greater than 0.
- Available since: v2.0.0
ZegoSuperBoardCursorAttribute
Details
Detailed description: The interface parameter construction class uses the parameters required by the incoming cursor style.
Business scenario: It needs to be passed when calling the [setCustomCursorAttribute:cursorAttribute:complete:] interface.
Declared in ZegoSuperBoardCursorAttribute.h
Properties
iconPath
offsetX
nonatomic, assign CGFloat offsetX- Default value: 0 Supported version: v2.4.0
offsetY
nonatomic, assign CGFloat offsetY- Default value: 18 Supported version: v2.4.0
titleStyle
nonatomic, strong ZegoSuperBoardCursorTitleStyle titleStyle- Default value: Refer to ZegoSuperBoardCursorTitleStyle class Supported version: v2.4.0
ZegoSuperBoardCursorTitleStyle
Cursor custom text information
Details
Cursor custom text information Business scenario: Available when you need to display cursor custom text
Declared in ZegoSuperBoardCursorTitlePosition.h
Properties
title
nonatomic, copy NSString * titleCursor custom text content
- Required: no
- Default value: ""
- Recommended value: User login name display
- Value range: 15 characters or less
bold
nonatomic, assign BOOL boldWhether the cursor custom text is bold
- Required: no
- Default value: false
italic
nonatomic, assign BOOL italicWhether the cursor custom text is italic
- Required: no
- Default value: false
size
nonatomic, assign int sizeCursor custom text font size
- Required: 否
- Default value: 16
- Value range: 12-20
color
nonatomic, strong int colorCursor custom text font color
- Required: no
- Default value: white
backgroundColor
nonatomic, strong int backgroundColorCursor custom text font background color
- Required: no
position
nonatomic, assign ZegoSuperBoardCursorTitlePosition positionCustomize the position of the text relative to the cursor
- Required: no
ZegoSuperBoardInitConfig
Details
The interface parameters are used to construct the class, and the parameters needed to initialize the SDK are initialized with the constructs.
- Use cases: The init SDK interface initWithConfig needs to be passed in.
Declared in ZegoSuperBoardInitConfig.h
Properties
appID
nonatomic,assign long appIDZEGO application ID for developers, please apply from ZEGO management console.
Required or not: Mandatory
Reference range: 0-4294967295.
token
nonatomic,copy NSString * tokenThe login verification token is obtained by registering the project in the instant console to obtain the key plus the specified algorithm. The test phase can be obtained through the interface provided by ZEGO, and the formal environment must be implemented by the user.
userID
public NSString * userIDUser ID, please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
appSign
public NSString * appSign- Value range: Detailed description: Value range: '0' ~ '9', 'a' ~ 'z'. Example: "9dc9a25bh2f2137446897071c8c033fa33b91c3dd2a85e0c000ae82c0dad3". Version 2.3.0 and above appSign allows to pass blank or no pass. If it is empty or not passed, you can pass the token for initialization.please refer to Using Token Authentication.
cacheFolder
public NSString * cacheFoldercache directory
logFolder
public NSString * logFolderlog directory
ZegoSuperBoardManager+File
Properties
toolType
nonatomic,assign,readwrite ZegoSuperBoardTool toolTypeDifferent tool types can be set to draw different primitives on the whiteboard.
Calling time: After initializing the ZegSuperBoard SDK.
- Available since: v2.0.0
brushColor
nonatomic,strong, readwrite UIColor * brushColorAfter selecting the brush tool type and setting brushColor, the new paint color on the whiteboard takes effect.
When to call
ZegSuperBoard SDK is initialized.- Caution: Only the new graffiti after setting the pen color will take effect. If the graffiti already exists on the whiteboard before, it will not be changed to the color.
- Available since: v2.0.0
brushSize
nonatomic,assign, readwrite NSUInteger brushSizeSelect the brush tool type, set brushSize value, and the new graffiti thickness on the whiteboard is the set value.
When to call
ZegSuperBoard SDK is initialized.- Caution: The newly added graffiti after only setting the brush thickness has a new thickness effect. The graffiti on the whiteboard will not be changed to the thickness.
- Available since: v2.0.0
fontSize
nonatomic,assign, readwrite NSUInteger fontSizeSelect the type of text tool, set fontSize, the new text on the whiteboard is the size after setting.
- Value range: an integer greater than 0
When to call
ZegSuperBoard SDK is initialized.- Caution: Only the new text after calling setFontSize will take effect. For example, the existing text on the whiteboard will not be changed to the font size.
- Available since: v2.0.0
isFontBold
nonatomic,assign, readwrite BOOL isFontBoldAfter selecting the type of text tool, calling setFontBold and setting it to YES, the newly added text on the whiteboard is all bold.
When to call
ZegSuperBoard SDK is initialized.- Caution: Only the newly-added text after setting the text bold will have the bold effect. For example, the existing text on the whiteboard will not be changed to the bold effect.
- Available since: 2.0.0
isFontItalic
nonatomic, assign, readwrite BOOL isFontItalicWhen the currently used tool type is text, call isFontItalic to get whether to set the italic effect
When to call
ZegSuperBoard SDK is initialized.- Available since: v2.0.0
customText
nonatomic, copy, readwrite NSString * customTextUsers can customize the default text of the text tools.
- Available since: v2.0.0
enableSyncScale
nonatomic, assign, readwrite BOOL enableSyncScaleAfter enabling, you can send out the zoom of the local end. Whether the peer end wants to accept it, you need to enable the peer end to accept the zoom.
- Use cases: Synchronize the zooming of the whiteboard on the operating end and the receiving end.
- When to call: After ZegSuperboard SDK is initialized.
- Caution: To achieve dual-ended zoom synchronization, you need to set enableSyncScale and enableResponseScale at the same time
- Related callbacks: scaling changes occur on the peer end, and the receiving end can monitor the changed parameters through remoteSuperBoardScaleChanged.
- Available since: v2.0.0
enableResponseScale
nonatomic, assign, readwrite BOOL enableResponseScaleAfter it is turned on, it can respond to the zooming of other members in the room, provided that the peer end synchronizes the zooming to other members in the room.
- Use cases: Synchronize the zooming of the whiteboard on the operating end and the receiving end.
- When to call: After ZegSuperboard SDK is initialized.
- Caution: To achieve dual-ended zoom synchronization, you need to set enableSyncScale and enableResponseScale at the same time
- Related callbacks: scaling changes occur on the peer end, and the receiving end can monitor the changed parameters through remoteSuperBoardScaleChanged.
- Available since: v2.0.0
enableHandwriting
nonatomic, assign, readwrite BOOL enableHandwritingSet whether the whiteboard graffiti has a pen sharp effect. If set to true, the graffiti will have a pen sharp effect.
- Use cases: Adjust the thickness and shape of the strokes according to the speed of the graffiti drawing process to enhance the writing experience.
- When to call: Initialize the SDK, after rendering the whiteboard.
- Available since: v2.0.0
delegate
nonatomic, weak id<ZegoSuperBoardManagerDelegate> delegateSet the agent of ZegoSuperBoardManager, you can implement the corresponding agent method to monitor the SDK superBoardSubView to add, destroy, switch, SDK exception, etc.
- Use cases: You need to update the superBoardSubView by adding, destroying, and switching.
- Available since: v2.0.0
superBoardView
nonatomic, strong,readonly ZegoSuperBoardView * superBoardViewOpen the SuperBoardView mode to get the object.
- Use cases: SuperBoardView mode is turned on, use the method on the object to switch the whiteboard on the A side, and the B side will automatically synchronize.
- Default value: Get the object by default
When to call
initializing ZegoSuperboard SDK.- Caution: If you use the enableSuperBoardView interface and set it to false, you cannot get the SuperBoardView object.
- Available since: v2.0.0
superBoardSubViewModelList
nonatomic, strong,readonly NSArray <ZegoSuperBoardSubViewModel *> * superBoardSubViewModelListThrough superBoardSubViewModelList, access to the current existing superBoardSubView room number and superBoardSubView information.
- Use cases: After entering the room, you need to obtain the superBoardSubView list in the room for display, and switch the current superBoardSubView in the list.
When to call
initializing ZegoSuperboard SDK.- Available since: v2.0.0
enableCustomCursor
nonatomic, assign, readwrite BOOL enableCustomCursorDetailed description: Set whether to enable custom cursor, set to true to display the cursor. The default is true
Business scenario: the cursor function is displayed during the graffiti process.
Timing of calling: After initializing the SDK.
Supported version: v2.2.0
enableRemoteCursorVisible
nonatomic, assign, readwrite BOOL enableRemoteCursorVisibleDetailed description: Set whether to display the remote cursor or not, set to true to display the remote cursor. The default is true.
Business scenario: display the remote cursor function during the graffiti process.
Timing of calling: After initializing the SDK.
Supported version: v2.2.0
superBoardMaxScaleFactor
nonatomic, assign, readwrite CGFloat superBoardMaxScaleFactorMethod description: Set the maximum zoom factor of Super Whiteboard (file and whiteboard), which is 3x by default. The range that can be set is [1,10] Call timing: After initialization, before creating the file/whiteboard, and after unInit expires.
Methods
sharedInstance
+ (ZegoSuperBoardManager *)sharedInstance;- When to call /Trigger: After integrating ZegoSuperBoard SDK, before initializing ZegoSuperBoard SDK.
- Available since: v2.0.0
Detailed description: Get the ZegoSuperBoardManager instance object to call the interface method in ZegoSuperBoardManager.
ZegoSuperBoardManager instance object
uploadFile:filePath:renderType:completionBlock:
- (ZegoSuperBoardSeq)uploadFile:(nonnull NSString *) filePath renderType:(ZegoSuperBoardRenderType) renderType completionBlock:(nonnull ZegoSuperBoardUploadBlock) completionBlock;Parameters
| Name | Type | Description |
|---|---|---|
| filePath | nonnull NSString * | The absolute path of the files to be uploaded can be PPT, PDF, XLS, JPG, JPEG, PNG, BMP, and TXT files. For details, please refer to File specifications. |
| renderType | ZegoSuperBoardRenderType | After the upload file transcoding rendering mode type, suggest set to ZegoSuperBoardRenderTypeVectorAndIMG, see ZegoSuperBoardRenderType. |
| completionBlock | nonnull ZegoSuperBoardUploadBlock | Upload progress and result callback. During the process of uploading a file, you will receive multiple callback in [completionBlock]. For details, see ZegoSuperBoardUploadBlock |
Details
During the upload process, the SDK will format the file according to the passed [renderType]. After the format conversion, the rendering mode of the file depends on the passed [renderType]. The progress information of the upload can be obtained in the result callback
- Use cases: Upload files to the ZegoDocs service.
- Caution: There will be multiple callbacks during the upload phase, please refer to the definition of ZegoSuperBoardUploadState for details
When to call
ZegSuperBoard SDK is initialized.- Available since: v2.0.0
Return
Return the request seq to upload the file
cancelUploadFileWithSeq:seq:completionBlock:
- (void)cancelUploadFileWithSeq:(ZegoSuperBoardSeq) seq completionBlock:(ZegoSuperBoardCancelUploadComplementBlock) completionBlock;Parameters
| Name | Type | Description |
|---|---|---|
| seq | ZegoSuperBoardSeq | Upload seq returned when uploadFile is called. |
| completionBlock | ZegoSuperBoardCancelUploadComplementBlock | Cancel upload file result callback. |
Details
To cancel the file upload operation, the seQ of the corresponding upload task must be passed.
- Use cases: File uploading to the ZegoDocs service is interrupted during the process.
When to call
when the uploadFile interface is in the process of uploading a file.cacheFileWithFileID:fileID:completionBlock:
- (ZegoSuperBoardSeq)cacheFileWithFileID:(nonnull NSString *) fileID completionBlock:(ZegoSuperBoardCacheBlock) completionBlock;Parameters
| Name | Type | Description |
|---|---|---|
| fileID | nonnull NSString * | The fileID to be cached. |
| completionBlock | ZegoSuperBoardCacheBlock | The callback that contains the progress and result of file download operation |
Details
You can save the corresponding file to the local.
- Use cases: Save the file to the local directory. You do not need to request the network to open the file next time, which improves the opening speed.
- When to call: You need to call it after initWithConfig.
- Available since: v2.0.0
Return
The sequence number of caching operation
cancelCacheFileWithSeq:seq:completionBlock:
- (void)cancelCacheFileWithSeq:(ZegoSuperBoardSeq) seq completionBlock:(ZegoSuperBoardCancelCacheComplementBlock) completionBlock;Parameters
| Name | Type | Description |
|---|---|---|
| seq | ZegoSuperBoardSeq | The sequence number of caching operation. |
| completionBlock | ZegoSuperBoardCancelCacheComplementBlock | Callback when cancelling finishes. |
Details
You can cancel the operation that is caching the file. You need to pass in the seQ corresponding to the operation of caching the file. After canceling the operation, the file will not be cached locally.
- Use cases: The cancelCacheFile method can be called to cancel the operation that needs to be interrupted during the execution of the cache file.
- When to call: You need to call it after initWithConfig.
- Related APIs: cacheFile.
- Available since: v2.0.0
Return
Operation results
queryFileCachedWithFileID:fileID:completionBlock:
- (void)queryFileCachedWithFileID:(nonnull NSString *) fileID completionBlock:(ZegoSuperBoardQueryCachedCompletionBlock) completionBlock;Parameters
| Name | Type | Description |
|---|---|---|
| fileID | nonnull NSString * | The ID of the file to be queried. |
| completionBlock | ZegoSuperBoardQueryCachedCompletionBlock | Callback when query operation finishes. |
Details
The ID of the corresponding file can be used to check whether the file has been cached locally.
- Use cases: None Example Query whether the file cache exists.
- When to call: You need to call it after initWithConfig.
- Related APIs: cancelCacheFile.
- Available since: v2.0.0
uploadH5File:filePath:config:completionBlock:
- (ZegoSuperBoardSeq)uploadH5File:(nonnull NSString *) filePath config:(ZegoUploadCustomH5Config *) config completionBlock:(ZegoSuperBoardUploadBlock) completionBlock;Parameters
| Name | Type | Description |
|---|---|---|
| filePath | nonnull NSString * | Local path for custom courseware |
| config | ZegoUploadCustomH5Config * | Configuration of H5 courseware customization |
| completionBlock | ZegoSuperBoardUploadBlock |
Details
During the upload process, SDK will convert the format of the file according to the incoming [config]. After the format conversion, the width and height of the page number of the file and whether the thumbnail is included depend on the incoming [config]. The progress information of the upload can be obtained in the result callback.
- Use cases: Upload custom H5 courseware.
- When to call: You need to call it after the initialization is successful.
- Available since: v2.0.0
Return
Return the result seq of uploadH5File method
setSuperBoardMaxScaleFactor:scaleFactor:
- (void)setSuperBoardMaxScaleFactor:(Float) scaleFactor;Parameters
| Name | Type | Description |
|---|---|---|
| scaleFactor | Float | Description maximum zoom factor of Super Whiteboard (file and whiteboard) |
Details
Set the maximum zoom factor of Super Whiteboard (file and whiteboard), which is 3x by default. The range that can be set is [1,10]
- When to call /Trigger: After initialization, before creating the file/whiteboard, and after unInit expires.
- Available since: 2.3.7
renewToken:token:
- (void)renewToken:(NSString *) token;Parameters
| Name | Type | Description |
|---|---|---|
| token | NSString * | A token to be updated. |
- Default value: None
Call time: after initializing the SDK, with the help of the upcoming expiration callback [tokenwillexpire] interface of zego SDK, receive the upcoming expiration callback of the token, and actively update the file service token of the super whiteboard.
Scope of influence: the expiration time contained in the token will trigger the [tokenwillexpire] callback 30s before expiration
Related callback: [tokenwillexpire]
Related interfaces: None
- Platform differences: None
setManagerListener:listener:
- (void)setManagerListener:(ZegoSuperBoardManagerDelegate) listener;Parameters
| Name | Type | Description |
|---|---|---|
| listener | ZegoSuperBoardManagerDelegate | Monitor whiteboard callback information |
- When to call /Trigger: after init
- Available since: v2.0.0
initWithConfig:config:complete:
- (void)initWithConfig:(ZegoSuperBoardInitConfig *) config complete:(ZegoSuperBoardManagerBlock) complete;Parameters
| Name | Type | Description |
|---|---|---|
| config | ZegoSuperBoardInitConfig * | Configuration information required for SDK initialization |
| complete | ZegoSuperBoardManagerBlock | Initialization result callback |
Details
Method to initialize the ZegoSuperBoard SDK.
- Use cases: Initialize the ZegoSuperBoard SDK.
- When to call: Before calling the ZegoExpressEngine SDK's loginRoom interface
- Related APIs: unInit.
- Available since: v2.0.0
setCustomizedConfig:value:key:
- (void)setCustomizedConfig:(nonnull NSString *) value key:(nonnull NSString *) key;Parameters
| Name | Type | Description |
|---|---|---|
| value | nonnull NSString * | value description |
| key | nonnull NSString * | key description |
- When to call: Called after initializing the Superboard SDK
- Available since: v2.0.0
Return
Whether the setting is successful
enableSuperBoardView:enable:
- (void)enableSuperBoardView:(BOOL) enable;Parameters
| Name | Type | Description |
|---|---|---|
| enable | BOOL | YES: SuperBoardView is used. NO: SuperBoardView is not used,The default is YES |
Details
Set whether to use SuperBoardView.
When to call : Before initializing the SDK.
Open by default
- Available since: v2.0.0
createWhiteboardView:config:complete:
- (void)createWhiteboardView:(nonnull ZegoCreateWhiteboardConfig *) config complete:(ZegoSuperBoardManagerCreateBlock) complete;Parameters
| Name | Type | Description |
|---|---|---|
| config | nonnull ZegoCreateWhiteboardConfig * | Pure Whiteboard configuration parameters |
| complete | ZegoSuperBoardManagerCreateBlock | Creates a result callback for a pure whiteboard |
Details
After the creation is successful, the corresponding SubView will be saved internally and its subViewModel data will be returned.
- When to call: After initializing the ZegoSuperboard SDK, calling [loginRoom] to log in to the room, when you need to create a pure whiteboard.
createFileView:config:complete:
- (void)createFileView:(nonnull ZegoCreateFileConfig *) config complete:(ZegoSuperBoardManagerCreateBlock) complete;Parameters
| Name | Type | Description |
|---|---|---|
| config | nonnull ZegoCreateFileConfig * | The configuration parameters required to create the file |
| complete | ZegoSuperBoardManagerCreateBlock | Create the result callback for the file |
Details
After the creation is successful, the corresponding SubView will be saved internally and its subViewModel data will be returned.
When to Call: Initialize the ZegoSuperboard SDK and call [loginRoom] to login to the room when the file needs to be created.
destroySuperBoardSubView:uniqueID:complete:
- (void)destroySuperBoardSubView:(NSString *) uniqueID complete:(ZegoSuperBoardManagerBlock) complete;Parameters
| Name | Type | Description |
|---|---|---|
| uniqueID | NSString * | Unique identifier of the ZegoSuperBoardSubView object |
| complete | ZegoSuperBoardManagerBlock | Destroys the result callback for the specified SuperBoardSubView |
Details
Available Since: v2.0.0
When to call
the call querySuperBoardSubViewList pull to list or superBoardSubViewModelList get called when the model number greater than zero.querySuperBoardSubViewList:complete:
- (void)querySuperBoardSubViewList:(void(^)(ZegoSuperBoardError errorCode,NSArray <ZegoSuperBoardSubViewModel *>*superBoardViewList)) complete;Parameters
| Name | Type | Description |
|---|---|---|
| complete | void(^)(ZegoSuperBoardError errorCode,NSArray <ZegoSuperBoardSubViewModel *>*superBoardViewList) | Gets the resulting callback for the SuperBoardSubView list |
Details
Pull down the whiteboard in the current room at one time, SDK internal will be associated with the file in the whiteboard file also loaded down, these whiteboard and file SDK internal processing mapping added to the ZegoSuperBoardSubView, external only need to use ZegoSuperBoardView.
When to call
the SDK and call it after logging in to the room.- Available since: v2.0.0
getSuperBoardSubView:uniqueID:
- (ZegoSuperBoardSubView *)getSuperBoardSubView:(NSString *) uniqueID;Parameters
| Name | Type | Description |
|---|---|---|
| uniqueID | NSString * | Unique identifier of the ZegoSuperBoardSubView object |
- When to call: Initialize the SDK, enter the room successfully, get the SuperBoardSubView list after the call.
Limited to scenarios where SuperBoardView is not used (set by enableSuperBoardView
- Available since: v2.0.0
clearCache
- (void)clearCache;- Available since: v2.0.0
Calling time: Initialization, after entering the room, the SDK needs to call it actively before exiting the room to clean up the resources in the room.
clear
- (void)clear;When checking out, you need to clear the cache information in the room and stop media playback.
- When to call: You need to call it before you check out.
- Available since: v2.0.0
unInit
- (void)unInit;- When to call: When you need to reinitialize the SDK, you must first call unInit.
- Available since: v2.0.0
getSDKVersion
- (NSString *)getSDKVersion;Obtain the SDK version number.
- Use cases:
- When the SDK is running, if the developer finds the discrepancy with the expected situation, the developer can submit the problem and related logs to the ZEGO technical personnel for locating the problem. The ZEGO technical personnel may need the SDK version information to assist locating the problem.
- Developers can also collect this information as the VERSION information of the SDK used by the App, so as to make statistics of the SDK corresponding to each version of the App online.
- When to call: It can be called at any time.
- Available since: v2.0.0
Version number of the SDK
getCustomizedConfig:key:
- (NSString *)getCustomizedConfig:(nonnull NSString *) key;Parameters
| Name | Type | Description |
|---|---|---|
| key | nonnull NSString * |
Details
Get the value of the set configuration item.
- When to call: After initializing the Superboard SDK, after calling setCustomizedConfig.
- Available since: 2.0.0
ZegoSuperBoardManager+WhiteBoard
Properties
toolType
nonatomic,assign,readwrite ZegoSuperBoardTool toolTypeDifferent tool types can be set to draw different primitives on the whiteboard.
Calling time: After initializing the ZegSuperBoard SDK.
- Available since: v2.0.0
brushColor
nonatomic,strong, readwrite UIColor * brushColorAfter selecting the brush tool type and setting brushColor, the new paint color on the whiteboard takes effect.
When to call
ZegSuperBoard SDK is initialized.- Caution: Only the new graffiti after setting the pen color will take effect. If the graffiti already exists on the whiteboard before, it will not be changed to the color.
- Available since: v2.0.0
brushSize
nonatomic,assign, readwrite NSUInteger brushSizeSelect the brush tool type, set brushSize value, and the new graffiti thickness on the whiteboard is the set value.
When to call
ZegSuperBoard SDK is initialized.- Caution: The newly added graffiti after only setting the brush thickness has a new thickness effect. The graffiti on the whiteboard will not be changed to the thickness.
- Available since: v2.0.0
fontSize
nonatomic,assign, readwrite NSUInteger fontSizeSelect the type of text tool, set fontSize, the new text on the whiteboard is the size after setting.
- Value range: an integer greater than 0
When to call
ZegSuperBoard SDK is initialized.- Caution: Only the new text after calling setFontSize will take effect. For example, the existing text on the whiteboard will not be changed to the font size.
- Available since: v2.0.0
isFontBold
nonatomic,assign, readwrite BOOL isFontBoldAfter selecting the type of text tool, calling setFontBold and setting it to YES, the newly added text on the whiteboard is all bold.
When to call
ZegSuperBoard SDK is initialized.- Caution: Only the newly-added text after setting the text bold will have the bold effect. For example, the existing text on the whiteboard will not be changed to the bold effect.
- Available since: 2.0.0
isFontItalic
nonatomic, assign, readwrite BOOL isFontItalicWhen the currently used tool type is text, call isFontItalic to get whether to set the italic effect
When to call
ZegSuperBoard SDK is initialized.- Available since: v2.0.0
customText
nonatomic, copy, readwrite NSString * customTextUsers can customize the default text of the text tools.
- Available since: v2.0.0
enableSyncScale
nonatomic, assign, readwrite BOOL enableSyncScaleAfter enabling, you can send out the zoom of the local end. Whether the peer end wants to accept it, you need to enable the peer end to accept the zoom.
- Use cases: Synchronize the zooming of the whiteboard on the operating end and the receiving end.
- When to call: After ZegSuperboard SDK is initialized.
- Caution: To achieve dual-ended zoom synchronization, you need to set enableSyncScale and enableResponseScale at the same time
- Related callbacks: scaling changes occur on the peer end, and the receiving end can monitor the changed parameters through remoteSuperBoardScaleChanged.
- Available since: v2.0.0
enableResponseScale
nonatomic, assign, readwrite BOOL enableResponseScaleAfter it is turned on, it can respond to the zooming of other members in the room, provided that the peer end synchronizes the zooming to other members in the room.
- Use cases: Synchronize the zooming of the whiteboard on the operating end and the receiving end.
- When to call: After ZegSuperboard SDK is initialized.
- Caution: To achieve dual-ended zoom synchronization, you need to set enableSyncScale and enableResponseScale at the same time
- Related callbacks: scaling changes occur on the peer end, and the receiving end can monitor the changed parameters through remoteSuperBoardScaleChanged.
- Available since: v2.0.0
enableHandwriting
nonatomic, assign, readwrite BOOL enableHandwritingSet whether the whiteboard graffiti has a pen sharp effect. If set to true, the graffiti will have a pen sharp effect.
- Use cases: Adjust the thickness and shape of the strokes according to the speed of the graffiti drawing process to enhance the writing experience.
- When to call: Initialize the SDK, after rendering the whiteboard.
- Available since: v2.0.0
delegate
nonatomic, weak id<ZegoSuperBoardManagerDelegate> delegateSet the agent of ZegoSuperBoardManager, you can implement the corresponding agent method to monitor the SDK superBoardSubView to add, destroy, switch, SDK exception, etc.
- Use cases: You need to update the superBoardSubView by adding, destroying, and switching.
- Available since: v2.0.0
superBoardView
nonatomic, strong,readonly ZegoSuperBoardView * superBoardViewOpen the SuperBoardView mode to get the object.
- Use cases: SuperBoardView mode is turned on, use the method on the object to switch the whiteboard on the A side, and the B side will automatically synchronize.
- Default value: Get the object by default
When to call
initializing ZegoSuperboard SDK.- Caution: If you use the enableSuperBoardView interface and set it to false, you cannot get the SuperBoardView object.
- Available since: v2.0.0
superBoardSubViewModelList
nonatomic, strong,readonly NSArray <ZegoSuperBoardSubViewModel *> * superBoardSubViewModelListThrough superBoardSubViewModelList, access to the current existing superBoardSubView room number and superBoardSubView information.
- Use cases: After entering the room, you need to obtain the superBoardSubView list in the room for display, and switch the current superBoardSubView in the list.
When to call
initializing ZegoSuperboard SDK.- Available since: v2.0.0
enableCustomCursor
nonatomic, assign, readwrite BOOL enableCustomCursorDetailed description: Set whether to enable custom cursor, set to true to display the cursor. The default is true
Business scenario: the cursor function is displayed during the graffiti process.
Timing of calling: After initializing the SDK.
Supported version: v2.2.0
enableRemoteCursorVisible
nonatomic, assign, readwrite BOOL enableRemoteCursorVisibleDetailed description: Set whether to display the remote cursor or not, set to true to display the remote cursor. The default is true.
Business scenario: display the remote cursor function during the graffiti process.
Timing of calling: After initializing the SDK.
Supported version: v2.2.0
superBoardMaxScaleFactor
nonatomic, assign, readwrite CGFloat superBoardMaxScaleFactorMethod description: Set the maximum zoom factor of Super Whiteboard (file and whiteboard), which is 3x by default. The range that can be set is [1,10] Call timing: After initialization, before creating the file/whiteboard, and after unInit expires.
Methods
sharedInstance
+ (ZegoSuperBoardManager *)sharedInstance;- When to call /Trigger: After integrating ZegoSuperBoard SDK, before initializing ZegoSuperBoard SDK.
- Available since: v2.0.0
Detailed description: Get the ZegoSuperBoardManager instance object to call the interface method in ZegoSuperBoardManager.
ZegoSuperBoardManager instance object
setCustomFontWithName:regularFontName:boldFontName:
- (void)setCustomFontWithName:(NSString *) regularFontName boldFontName:(NSString *) boldFontName;Parameters
| Name | Type | Description |
|---|---|---|
| regularFontName | NSString * | Font name of regular font. Please contact technical support to obtain the font. |
| boldFontName | NSString * | Font name of the bold font. Please contact technical support to obtain the font. |
Details
You need to set a new custom font style for the text tool on the whiteboard.
- Use cases: Set custom new fonts.
- When to call: This is called after the whiteboard or file has been created.
- Caution: Only specific fonts are supported, and the font files provided by us need to be built into the project, please contact technical support to obtain the font file and the corresponding font name.
- Available since: v2.0.0
setSuperBoardMaxScaleFactor:scaleFactor:
- (void)setSuperBoardMaxScaleFactor:(Float) scaleFactor;Parameters
| Name | Type | Description |
|---|---|---|
| scaleFactor | Float | Description maximum zoom factor of Super Whiteboard (file and whiteboard) |
Details
Set the maximum zoom factor of Super Whiteboard (file and whiteboard), which is 3x by default. The range that can be set is [1,10]
- When to call /Trigger: After initialization, before creating the file/whiteboard, and after unInit expires.
- Available since: 2.3.7
renewToken:token:
- (void)renewToken:(NSString *) token;Parameters
| Name | Type | Description |
|---|---|---|
| token | NSString * | A token to be updated. |
- Default value: None
Call time: after initializing the SDK, with the help of the upcoming expiration callback [tokenwillexpire] interface of zego SDK, receive the upcoming expiration callback of the token, and actively update the file service token of the super whiteboard.
Scope of influence: the expiration time contained in the token will trigger the [tokenwillexpire] callback 30s before expiration
Related callback: [tokenwillexpire]
Related interfaces: None
- Platform differences: None
setManagerListener:listener:
- (void)setManagerListener:(ZegoSuperBoardManagerDelegate) listener;Parameters
| Name | Type | Description |
|---|---|---|
| listener | ZegoSuperBoardManagerDelegate | Monitor whiteboard callback information |
- When to call /Trigger: after init
- Available since: v2.0.0
initWithConfig:config:complete:
- (void)initWithConfig:(ZegoSuperBoardInitConfig *) config complete:(ZegoSuperBoardManagerBlock) complete;Parameters
| Name | Type | Description |
|---|---|---|
| config | ZegoSuperBoardInitConfig * | Configuration information required for SDK initialization |
| complete | ZegoSuperBoardManagerBlock | Initialization result callback |
Details
Method to initialize the ZegoSuperBoard SDK.
- Use cases: Initialize the ZegoSuperBoard SDK.
- When to call: Before calling the ZegoExpressEngine SDK's loginRoom interface
- Related APIs: unInit.
- Available since: v2.0.0
setCustomizedConfig:value:key:
- (void)setCustomizedConfig:(nonnull NSString *) value key:(nonnull NSString *) key;Parameters
| Name | Type | Description |
|---|---|---|
| value | nonnull NSString * | value description |
| key | nonnull NSString * | key description |
- When to call: Called after initializing the Superboard SDK
- Available since: v2.0.0
Return
Whether the setting is successful
enableSuperBoardView:enable:
- (void)enableSuperBoardView:(BOOL) enable;Parameters
| Name | Type | Description |
|---|---|---|
| enable | BOOL | YES: SuperBoardView is used. NO: SuperBoardView is not used,The default is YES |
Details
Set whether to use SuperBoardView.
When to call : Before initializing the SDK.
Open by default
- Available since: v2.0.0
createWhiteboardView:config:complete:
- (void)createWhiteboardView:(nonnull ZegoCreateWhiteboardConfig *) config complete:(ZegoSuperBoardManagerCreateBlock) complete;Parameters
| Name | Type | Description |
|---|---|---|
| config | nonnull ZegoCreateWhiteboardConfig * | Pure Whiteboard configuration parameters |
| complete | ZegoSuperBoardManagerCreateBlock | Creates a result callback for a pure whiteboard |
Details
After the creation is successful, the corresponding SubView will be saved internally and its subViewModel data will be returned.
- When to call: After initializing the ZegoSuperboard SDK, calling [loginRoom] to log in to the room, when you need to create a pure whiteboard.
createFileView:config:complete:
- (void)createFileView:(nonnull ZegoCreateFileConfig *) config complete:(ZegoSuperBoardManagerCreateBlock) complete;Parameters
| Name | Type | Description |
|---|---|---|
| config | nonnull ZegoCreateFileConfig * | The configuration parameters required to create the file |
| complete | ZegoSuperBoardManagerCreateBlock | Create the result callback for the file |
Details
After the creation is successful, the corresponding SubView will be saved internally and its subViewModel data will be returned.
When to Call: Initialize the ZegoSuperboard SDK and call [loginRoom] to login to the room when the file needs to be created.
destroySuperBoardSubView:uniqueID:complete:
- (void)destroySuperBoardSubView:(NSString *) uniqueID complete:(ZegoSuperBoardManagerBlock) complete;Parameters
| Name | Type | Description |
|---|---|---|
| uniqueID | NSString * | Unique identifier of the ZegoSuperBoardSubView object |
| complete | ZegoSuperBoardManagerBlock | Destroys the result callback for the specified SuperBoardSubView |
Details
Available Since: v2.0.0
When to call
the call querySuperBoardSubViewList pull to list or superBoardSubViewModelList get called when the model number greater than zero.querySuperBoardSubViewList:complete:
- (void)querySuperBoardSubViewList:(void(^)(ZegoSuperBoardError errorCode,NSArray <ZegoSuperBoardSubViewModel *>*superBoardViewList)) complete;Parameters
| Name | Type | Description |
|---|---|---|
| complete | void(^)(ZegoSuperBoardError errorCode,NSArray <ZegoSuperBoardSubViewModel *>*superBoardViewList) | Gets the resulting callback for the SuperBoardSubView list |
Details
Pull down the whiteboard in the current room at one time, SDK internal will be associated with the file in the whiteboard file also loaded down, these whiteboard and file SDK internal processing mapping added to the ZegoSuperBoardSubView, external only need to use ZegoSuperBoardView.
When to call
the SDK and call it after logging in to the room.- Available since: v2.0.0
getSuperBoardSubView:uniqueID:
- (ZegoSuperBoardSubView *)getSuperBoardSubView:(NSString *) uniqueID;Parameters
| Name | Type | Description |
|---|---|---|
| uniqueID | NSString * | Unique identifier of the ZegoSuperBoardSubView object |
- When to call: Initialize the SDK, enter the room successfully, get the SuperBoardSubView list after the call.
Limited to scenarios where SuperBoardView is not used (set by enableSuperBoardView
- Available since: v2.0.0
clearCache
- (void)clearCache;- Available since: v2.0.0
Calling time: Initialization, after entering the room, the SDK needs to call it actively before exiting the room to clean up the resources in the room.
clear
- (void)clear;When checking out, you need to clear the cache information in the room and stop media playback.
- When to call: You need to call it before you check out.
- Available since: v2.0.0
unInit
- (void)unInit;- When to call: When you need to reinitialize the SDK, you must first call unInit.
- Available since: v2.0.0
getSDKVersion
- (NSString *)getSDKVersion;Obtain the SDK version number.
- Use cases:
- When the SDK is running, if the developer finds the discrepancy with the expected situation, the developer can submit the problem and related logs to the ZEGO technical personnel for locating the problem. The ZEGO technical personnel may need the SDK version information to assist locating the problem.
- Developers can also collect this information as the VERSION information of the SDK used by the App, so as to make statistics of the SDK corresponding to each version of the App online.
- When to call: It can be called at any time.
- Available since: v2.0.0
Version number of the SDK
getCustomizedConfig:key:
- (NSString *)getCustomizedConfig:(nonnull NSString *) key;Parameters
| Name | Type | Description |
|---|---|---|
| key | nonnull NSString * |
Details
Get the value of the set configuration item.
- When to call: After initializing the Superboard SDK, after calling setCustomizedConfig.
- Available since: 2.0.0
ZegoSuperBoardManager
Details
Interface class, SDK initialization, global function Settings in the room, create files or pure whiteboard, etc.
- Use cases: It is used to initialize the SDK, set some whiteboard tools, zoom synchronization, and brush effects, obtain boardView, and create pure whiteboard and files when the boardView mode is enabled.
- Platform differences: There is no
Declared in ZegoSuperBoardManager.h
Properties
toolType
nonatomic,assign,readwrite ZegoSuperBoardTool toolTypeDifferent tool types can be set to draw different primitives on the whiteboard.
Calling time: After initializing the ZegSuperBoard SDK.
- Available since: v2.0.0
brushColor
nonatomic,strong, readwrite UIColor * brushColorAfter selecting the brush tool type and setting brushColor, the new paint color on the whiteboard takes effect.
When to call
ZegSuperBoard SDK is initialized.- Caution: Only the new graffiti after setting the pen color will take effect. If the graffiti already exists on the whiteboard before, it will not be changed to the color.
- Available since: v2.0.0
brushSize
nonatomic,assign, readwrite NSUInteger brushSizeSelect the brush tool type, set brushSize value, and the new graffiti thickness on the whiteboard is the set value.
When to call
ZegSuperBoard SDK is initialized.- Caution: The newly added graffiti after only setting the brush thickness has a new thickness effect. The graffiti on the whiteboard will not be changed to the thickness.
- Available since: v2.0.0
fontSize
nonatomic,assign, readwrite NSUInteger fontSizeSelect the type of text tool, set fontSize, the new text on the whiteboard is the size after setting.
- Value range: an integer greater than 0
When to call
ZegSuperBoard SDK is initialized.- Caution: Only the new text after calling setFontSize will take effect. For example, the existing text on the whiteboard will not be changed to the font size.
- Available since: v2.0.0
isFontBold
nonatomic,assign, readwrite BOOL isFontBoldAfter selecting the type of text tool, calling setFontBold and setting it to YES, the newly added text on the whiteboard is all bold.
When to call
ZegSuperBoard SDK is initialized.- Caution: Only the newly-added text after setting the text bold will have the bold effect. For example, the existing text on the whiteboard will not be changed to the bold effect.
- Available since: 2.0.0
isFontItalic
nonatomic, assign, readwrite BOOL isFontItalicWhen the currently used tool type is text, call isFontItalic to get whether to set the italic effect
When to call
ZegSuperBoard SDK is initialized.- Available since: v2.0.0
customText
nonatomic, copy, readwrite NSString * customTextUsers can customize the default text of the text tools.
- Available since: v2.0.0
enableSyncScale
nonatomic, assign, readwrite BOOL enableSyncScaleAfter enabling, you can send out the zoom of the local end. Whether the peer end wants to accept it, you need to enable the peer end to accept the zoom.
- Use cases: Synchronize the zooming of the whiteboard on the operating end and the receiving end.
- When to call: After ZegSuperboard SDK is initialized.
- Caution: To achieve dual-ended zoom synchronization, you need to set enableSyncScale and enableResponseScale at the same time
- Related callbacks: scaling changes occur on the peer end, and the receiving end can monitor the changed parameters through remoteSuperBoardScaleChanged.
- Available since: v2.0.0
enableResponseScale
nonatomic, assign, readwrite BOOL enableResponseScaleAfter it is turned on, it can respond to the zooming of other members in the room, provided that the peer end synchronizes the zooming to other members in the room.
- Use cases: Synchronize the zooming of the whiteboard on the operating end and the receiving end.
- When to call: After ZegSuperboard SDK is initialized.
- Caution: To achieve dual-ended zoom synchronization, you need to set enableSyncScale and enableResponseScale at the same time
- Related callbacks: scaling changes occur on the peer end, and the receiving end can monitor the changed parameters through remoteSuperBoardScaleChanged.
- Available since: v2.0.0
enableHandwriting
nonatomic, assign, readwrite BOOL enableHandwritingSet whether the whiteboard graffiti has a pen sharp effect. If set to true, the graffiti will have a pen sharp effect.
- Use cases: Adjust the thickness and shape of the strokes according to the speed of the graffiti drawing process to enhance the writing experience.
- When to call: Initialize the SDK, after rendering the whiteboard.
- Available since: v2.0.0
delegate
nonatomic, weak id<ZegoSuperBoardManagerDelegate> delegateSet the agent of ZegoSuperBoardManager, you can implement the corresponding agent method to monitor the SDK superBoardSubView to add, destroy, switch, SDK exception, etc.
- Use cases: You need to update the superBoardSubView by adding, destroying, and switching.
- Available since: v2.0.0
superBoardView
nonatomic, strong,readonly ZegoSuperBoardView * superBoardViewOpen the SuperBoardView mode to get the object.
- Use cases: SuperBoardView mode is turned on, use the method on the object to switch the whiteboard on the A side, and the B side will automatically synchronize.
- Default value: Get the object by default
When to call
initializing ZegoSuperboard SDK.- Caution: If you use the enableSuperBoardView interface and set it to false, you cannot get the SuperBoardView object.
- Available since: v2.0.0
superBoardSubViewModelList
nonatomic, strong,readonly NSArray <ZegoSuperBoardSubViewModel *> * superBoardSubViewModelListThrough superBoardSubViewModelList, access to the current existing superBoardSubView room number and superBoardSubView information.
- Use cases: After entering the room, you need to obtain the superBoardSubView list in the room for display, and switch the current superBoardSubView in the list.
When to call
initializing ZegoSuperboard SDK.- Available since: v2.0.0
enableCustomCursor
nonatomic, assign, readwrite BOOL enableCustomCursorDetailed description: Set whether to enable custom cursor, set to true to display the cursor. The default is true
Business scenario: the cursor function is displayed during the graffiti process.
Timing of calling: After initializing the SDK.
Supported version: v2.2.0
enableRemoteCursorVisible
nonatomic, assign, readwrite BOOL enableRemoteCursorVisibleDetailed description: Set whether to display the remote cursor or not, set to true to display the remote cursor. The default is true.
Business scenario: display the remote cursor function during the graffiti process.
Timing of calling: After initializing the SDK.
Supported version: v2.2.0
superBoardMaxScaleFactor
nonatomic, assign, readwrite CGFloat superBoardMaxScaleFactorMethod description: Set the maximum zoom factor of Super Whiteboard (file and whiteboard), which is 3x by default. The range that can be set is [1,10] Call timing: After initialization, before creating the file/whiteboard, and after unInit expires.
Methods
sharedInstance
+ (ZegoSuperBoardManager *)sharedInstance;ZegoSuperBoardManager.h- When to call /Trigger: After integrating ZegoSuperBoard SDK, before initializing ZegoSuperBoard SDK.
- Available since: v2.0.0
Detailed description: Get the ZegoSuperBoardManager instance object to call the interface method in ZegoSuperBoardManager.
ZegoSuperBoardManager instance object
setSuperBoardMaxScaleFactor:scaleFactor:
- (void)setSuperBoardMaxScaleFactor:(Float) scaleFactor;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| scaleFactor | Float | Description maximum zoom factor of Super Whiteboard (file and whiteboard) |
Details
Set the maximum zoom factor of Super Whiteboard (file and whiteboard), which is 3x by default. The range that can be set is [1,10]
- When to call /Trigger: After initialization, before creating the file/whiteboard, and after unInit expires.
- Available since: 2.3.7
renewToken:token:
- (void)renewToken:(NSString *) token;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| token | NSString * | A token to be updated. |
- Default value: None
Call time: after initializing the SDK, with the help of the upcoming expiration callback [tokenwillexpire] interface of zego SDK, receive the upcoming expiration callback of the token, and actively update the file service token of the super whiteboard.
Scope of influence: the expiration time contained in the token will trigger the [tokenwillexpire] callback 30s before expiration
Related callback: [tokenwillexpire]
Related interfaces: None
- Platform differences: None
setManagerListener:listener:
- (void)setManagerListener:(ZegoSuperBoardManagerDelegate) listener;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| listener | ZegoSuperBoardManagerDelegate | Monitor whiteboard callback information |
- When to call /Trigger: after init
- Available since: v2.0.0
initWithConfig:config:complete:
- (void)initWithConfig:(ZegoSuperBoardInitConfig *) config complete:(ZegoSuperBoardManagerBlock) complete;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| config | ZegoSuperBoardInitConfig * | Configuration information required for SDK initialization |
| complete | ZegoSuperBoardManagerBlock | Initialization result callback |
Details
Method to initialize the ZegoSuperBoard SDK.
- Use cases: Initialize the ZegoSuperBoard SDK.
- When to call: Before calling the ZegoExpressEngine SDK's loginRoom interface
- Related APIs: unInit.
- Available since: v2.0.0
setCustomizedConfig:value:key:
- (void)setCustomizedConfig:(nonnull NSString *) value key:(nonnull NSString *) key;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| value | nonnull NSString * | value description |
| key | nonnull NSString * | key description |
- When to call: Called after initializing the Superboard SDK
- Available since: v2.0.0
Return
Whether the setting is successful
enableSuperBoardView:enable:
- (void)enableSuperBoardView:(BOOL) enable;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| enable | BOOL | YES: SuperBoardView is used. NO: SuperBoardView is not used,The default is YES |
Details
Set whether to use SuperBoardView.
When to call : Before initializing the SDK.
Open by default
- Available since: v2.0.0
createWhiteboardView:config:complete:
- (void)createWhiteboardView:(nonnull ZegoCreateWhiteboardConfig *) config complete:(ZegoSuperBoardManagerCreateBlock) complete;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| config | nonnull ZegoCreateWhiteboardConfig * | Pure Whiteboard configuration parameters |
| complete | ZegoSuperBoardManagerCreateBlock | Creates a result callback for a pure whiteboard |
Details
After the creation is successful, the corresponding SubView will be saved internally and its subViewModel data will be returned.
- When to call: After initializing the ZegoSuperboard SDK, calling [loginRoom] to log in to the room, when you need to create a pure whiteboard.
createFileView:config:complete:
- (void)createFileView:(nonnull ZegoCreateFileConfig *) config complete:(ZegoSuperBoardManagerCreateBlock) complete;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| config | nonnull ZegoCreateFileConfig * | The configuration parameters required to create the file |
| complete | ZegoSuperBoardManagerCreateBlock | Create the result callback for the file |
Details
After the creation is successful, the corresponding SubView will be saved internally and its subViewModel data will be returned.
When to Call: Initialize the ZegoSuperboard SDK and call [loginRoom] to login to the room when the file needs to be created.
destroySuperBoardSubView:uniqueID:complete:
- (void)destroySuperBoardSubView:(NSString *) uniqueID complete:(ZegoSuperBoardManagerBlock) complete;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| uniqueID | NSString * | Unique identifier of the ZegoSuperBoardSubView object |
| complete | ZegoSuperBoardManagerBlock | Destroys the result callback for the specified SuperBoardSubView |
Details
Available Since: v2.0.0
When to call
the call querySuperBoardSubViewList pull to list or superBoardSubViewModelList get called when the model number greater than zero.querySuperBoardSubViewList:complete:
- (void)querySuperBoardSubViewList:(void(^)(ZegoSuperBoardError errorCode,NSArray <ZegoSuperBoardSubViewModel *>*superBoardViewList)) complete;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| complete | void(^)(ZegoSuperBoardError errorCode,NSArray <ZegoSuperBoardSubViewModel *>*superBoardViewList) | Gets the resulting callback for the SuperBoardSubView list |
Details
Pull down the whiteboard in the current room at one time, SDK internal will be associated with the file in the whiteboard file also loaded down, these whiteboard and file SDK internal processing mapping added to the ZegoSuperBoardSubView, external only need to use ZegoSuperBoardView.
When to call
the SDK and call it after logging in to the room.- Available since: v2.0.0
getSuperBoardSubView:uniqueID:
- (ZegoSuperBoardSubView *)getSuperBoardSubView:(NSString *) uniqueID;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| uniqueID | NSString * | Unique identifier of the ZegoSuperBoardSubView object |
- When to call: Initialize the SDK, enter the room successfully, get the SuperBoardSubView list after the call.
Limited to scenarios where SuperBoardView is not used (set by enableSuperBoardView
- Available since: v2.0.0
clearCache
- (void)clearCache;ZegoSuperBoardManager.h- Available since: v2.0.0
Calling time: Initialization, after entering the room, the SDK needs to call it actively before exiting the room to clean up the resources in the room.
clear
- (void)clear;ZegoSuperBoardManager.hWhen checking out, you need to clear the cache information in the room and stop media playback.
- When to call: You need to call it before you check out.
- Available since: v2.0.0
unInit
- (void)unInit;ZegoSuperBoardManager.h- When to call: When you need to reinitialize the SDK, you must first call unInit.
- Available since: v2.0.0
getSDKVersion
- (NSString *)getSDKVersion;ZegoSuperBoardManager.hObtain the SDK version number.
- Use cases:
- When the SDK is running, if the developer finds the discrepancy with the expected situation, the developer can submit the problem and related logs to the ZEGO technical personnel for locating the problem. The ZEGO technical personnel may need the SDK version information to assist locating the problem.
- Developers can also collect this information as the VERSION information of the SDK used by the App, so as to make statistics of the SDK corresponding to each version of the App online.
- When to call: It can be called at any time.
- Available since: v2.0.0
Version number of the SDK
getCustomizedConfig:key:
- (NSString *)getCustomizedConfig:(nonnull NSString *) key;ZegoSuperBoardManager.hParameters
| Name | Type | Description |
|---|---|---|
| key | nonnull NSString * |
Details
Get the value of the set configuration item.
- When to call: After initializing the Superboard SDK, after calling setCustomizedConfig.
- Available since: 2.0.0
ZegoSuperBoardSubView
Details
Interface class used to describe a pure whiteboard or file whiteboard.
- Use cases: The whiteboard is used to operate and set the status and operation of the whiteboard.
- Caution: You need to log in room first. Check whether it is empty before using it.
Declared in ZegoSuperBoardSubView.h
Properties
model
nonatomic,strong,readonly ZegoSuperBoardSubViewModel * modelGet model data corresponding to ZegoSuperBoardSubView
- Use cases: Get ZegoSuperBoardSubView model data, such as ID, name, associated file ID, etc.
- Available since: 2.0.0 and above.
pageCount
nonatomic,assign,readonly NSInteger pageCountGet the page number of the currently displayed content
- Available since: 2.0.0 and above.
excelSheetNameList
nonatomic,strong,readonly NSArray <NSString *>* excelSheetNameListGet the names of all sheet tables in this excel file.
- Use cases: When you need to display the sheet table of the excel file, use this method to get the names of all the sheet tables of the excel file.
- Caution: Return nil for non-excel file types.
- Available since: v2.0.0
currentSheetName
nonatomic,copy,readonly NSString * currentSheetNameGet the name of the currently displayed sheet, if it is not excel, return nil.
- Available since: v2.0.0.
visibleSize
nonatomic,assign,readonly CGSize visibleSizeSuperBoardSubView Size of visible content area
- Available since: v2.0.0
delegate
nonatomic,weak id<ZegoSuperBoardSubViewDelegate> delegateSet event notification callbacks, and pass nil to clear the set callbacks.
- Available since: v2.0.0
currentPage
nonatomic,assign,readonly NSInteger currentPageGets the page number of the currently displayed content.
- Available since: 2.0.0 and above.
Methods
setCustomCursorAttribute:type:cursorAttribute:complete:
- (void)setCustomCursorAttribute:(ZegoSuperBoardViewCursorType) type cursorAttribute:(ZegoSuperBoardCursorAttribute *) cursorAttribute complete:(void(^)(int errorCode)) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| type | ZegoSuperBoardViewCursorType | Set the tool type, currently only supports setting the brush style |
| cursorAttribute | ZegoSuperBoardCursorAttribute * | cursor attribute |
| complete | void(^)(int errorCode) | callback |
Details
Supported version: 2.2.0 and above.
Detailed description: Set the pointer icon of the local custom cursor and the hot spot of the pointer (that is, the actual click position of the custom icon)
Required or not: Yes.
To set the hot spot of the pointer, two unitless non-negative numbers less than 32 are recommended.
Calling time: after opening the local custom cursor.
getThumbnailUrlList
- (NSArray *)getThumbnailUrlList;ZegoSuperBoardSubView.hIf you need to display the preview screen of the file, you can get the corresponding preview image through this interface, and then click the preview image to turn the page
- Use cases: Display the preview screen of each page of the document
- When to call /Trigger: Called after the file is loaded, otherwise it returns an empty list.
- Available since: v2.0.0
- Restrictions: Only support PDF, PPT, dynamic PPT, H5 file format, other types return an empty list.
List of URL addresses of thumbnails of each page of the file
getPPTNotes:page:
- (NSString *)getPPTNotes:(NSInteger) page;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| page | NSInteger | The specified page number, starting from 1 |
Details
Get the notes of the specified page number of the PPT.
- Use cases: Get the notes of the specified page number of the PPT.
- When to call: After the loadFile succeeds.
- Available since: v2.0.0
- Restrictions: Only support PPT, dynamic PPT file format, other types returns null.
Return
Notes on this page, if there are no notes, null will be returned
addTextEditWithComplete:complete:
- (void)addTextEditWithComplete:(nullable ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| complete | nullable ZegoSuperBoardSubViewBlock | Operation result callback, if you have the permission to create primitives, it will succeed, otherwise it will fail |
Details
Add text to the whiteboard View, and an input box will pop up from the bottom of the whiteboard after calling.
- Use cases: Add text to the whiteboard View, and an input box will pop up from the bottom of the whiteboard after calling.
- Default value: The default content of the input box is "text". You can set the default text using the ZegoSuperBoardManager property customText. The default display position is in the middle of the current whiteboard range
- Related callbacks: ZegoSuperBoardSubViewBlock
- Related APIs: ZegoSuperBoardManager property customText.
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0
addText:text:positionX:positionY:complete:
- (void)addText:(NSString *) text positionX:(int) positionX positionY:(int) positionY complete:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| text | NSString * | The string content of the text primitive to be added |
| positionX | int | The horizontal offset relative to the upper left corner of the viewport, such as 10, where the viewport refers to the writable area |
| positionY | int | The vertical offset relative to the upper left corner of the viewport, such as 10, where the viewport refers to the writable area |
| complete | ZegoSuperBoardSubViewBlock | Operation result callback, if you have the permission to create primitives, it will succeed, otherwise it will fail |
Details
Add text in the whiteboard view, you can specify the location of the addition, and the keyboard input box will not pop up.
- Use cases: Adding text at the specified position of the whiteboard view will create a new text primitive.
- Related callbacks: ZegoSuperBoardSubViewBlock.
- When to call: his is called when currentSuperBoardSubView exists.
- Available since: v2.0.0.
undo
- (void)undo;ZegoSuperBoardSubView.hUndo the last operation of the whiteboard.
- Use cases: Whiteboard related operations.
- Related APIs: redo.
- When to call: when currentSuperBoardSubView exists.
- Available since: v2.0.0.
redo
- (void)redo;ZegoSuperBoardSubView.hRestore the undone operation on the whiteboard.
- Use cases: Whiteboard related operations.
- Related APIs: undo.
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0.
clearCurrentPage:complete:
- (void)clearCurrentPage:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| complete | ZegoSuperBoardSubViewBlock | Operation result callback. If deleting the primitives of the current page is successful, it will return success, otherwise it will fail |
Details
Clear the primitives on the current page of the whiteboard.
- Use cases: Whiteboard related operations.
- Related APIs: clearAllPage.
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0
clearAllPage:complete:
- (void)clearAllPage:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| complete | ZegoSuperBoardSubViewBlock | Operation result callback. If you have the permission to delete primitives, it will return success, otherwise it will fail |
Details
Clear the primitives on all page of the whiteboard.
- Use cases: Whiteboard related operations.
- Related APIs: clearCurrentPage.
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0
setOperationMode:mode:
- (void)setOperationMode:(ZegoSuperBoardOperationMode) mode;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| mode | ZegoSuperBoardOperationMode | operation mode |
Details
Set the operation mode of the current whiteboard, such as prohibiting the client's gesture operation on the whiteboard.Users can use bitwise or to set multiple modes at the same time. For example, when set to ZegoSuperBoardOperationModeZoom | ZegoSuperBoardOperationModeDraw, it can support both zoom mode and drawing mode.
- Use cases: Normally, there is no need to call this method. When the toolType is set, the SDK will call this method to process the whiteboard. If you need to prohibit the client's gesture operation on the whiteboard, you can use this method to set it to None mode.
- Default value: Draw/zoom mode.
- Impacts on other APIs: When set to scroll mode, gestures will be recognized as scrolling, and when set to drawing mode, gestures will be recognized as drawing-related operations at this time.
- Caution: It can be called only when the currentSuperBoardSubView exists. You can use the getCurrentSuperBoardSubView() method to determine whether the currentSuperBoardSubView exists, otherwise it will not have any effect.
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0
flipToPage:targetPage:complete:
- (void)flipToPage:(NSInteger) targetPage complete:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| targetPage | NSInteger | The page number of the target page, starting from 1 |
| complete | ZegoSuperBoardSubViewBlock | Operation result callback |
Details
Jump to the specified page .
- Use cases: Specify a page number to jump.
- Caution: If it is a dynamic ppt or H5 file, the jump page may need to download pictures and animation resources, so frequent calls may cause it to take a long time to complete.
- Related callbacks: ZegoSuperBoardSubViewBlock.
- Related APIs: flipToPrePage,flipToNextPage
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0
flipToPrePage:complete:
- (void)flipToPrePage:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| complete | ZegoSuperBoardSubViewBlock | Operation result callback |
Details
Jump to the previous page.
- Caution: If it is a dynamic ppt or H5 file, the jump page may need to download pictures and animation resources, so frequent calls may cause it to take a long time to complete.
- Related callbacks: ZegoSuperBoardSubViewBlock.
- Related APIs: flipToPage,flipToNextPage
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0
flipToNextPage:complete:
- (void)flipToNextPage:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| complete | ZegoSuperBoardSubViewBlock | Operation result callback |
Details
Jump to the next page.
- Caution: If it is a dynamic ppt or H5 file, the jump page may need to download pictures and animation resources, so frequent calls may cause it to take a long time to complete.
- Related callbacks: ZegoSuperBoardSubViewBlock.
- Related APIs: flipToPage,flipToPrePage
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0
preStep:complete:
- (void)preStep:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| complete | ZegoSuperBoardSubViewBlock | Operation result callback |
Details
Jump to the previous step animation
- Caution: Only for dynamic ppt or H5 files, otherwise it will not have any effect.
- Related callbacks: ZegoSuperBoardSubViewBlock.
- Related APIs: nextStep.
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0.
nextStep:complete:
- (void)nextStep:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| complete | ZegoSuperBoardSubViewBlock | Operation result callback |
Details
Jump to the next step animation
- Caution: Only for dynamic ppt or H5 files, otherwise it will not have any effect.
- Related callbacks: ZegoSuperBoardSubViewBlock.
- Related APIs: preStep.
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0.
switchExcelSheet:sheetIndex:complete:
- (void)switchExcelSheet:(NSInteger) sheetIndex complete:(ZegoSuperBoardSubViewSwitchBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| sheetIndex | NSInteger | The index of the target sheet of the excel file |
| complete | ZegoSuperBoardSubViewSwitchBlock | Operation result callback |
Details
Switch the excel file to the specified sheet page.
- Use cases: When opening an excel file, the default is the 0th sheet page.
- Related callbacks: ZegoSuperBoardSubViewSwitchBlock.
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0.
addImage:type :address:positionX:positionY:complete:
- (void)addImage:(ZegoSuperBoardViewImageType) type address:(NSString *) address positionX:(int) positionX positionY:(int) positionY complete:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| type | ZegoSuperBoardViewImageType | Picture type, currently supports normal pictures and custom graphics |
| address | NSString * | Picture address, supports local picture address and network picture address, local picture will be uploaded to CDN storage first. Currently, custom graphics only support network picture addresses. (Only https is supported for network pictures) Example: "xxxxxxxxxx.png", " ". |
| positionX | int | The starting point of the image insertion position, relative to the horizontal offset of the upper left corner of the viewport, such as 10, where the viewport refers to the writable area. Just pass 0 to the custom graphics directly. |
| positionY | int | The starting point of the image insertion position, relative to the vertical offset of the upper left corner of the viewport, such as 10, where the viewport refers to the writable area. Just pass 0 to the custom graphics directly. |
| complete | ZegoSuperBoardSubViewBlock | Add picture result callback |
Details
Insert pictures into the whiteboard, directly insert into the whiteboard display or set custom graphics.
- Use cases: After setting the custom graphics, when the whiteboard tool is selected as the custom graphics, touching the whiteboard will draw the custom graphics passed in here.
- Caution: Supported image types: png/jpg/jpeg, when the type is ZegoWhiteboardViewImageGraphic, it supports local images and network images, and the image size limit is 10M. When the type is ZegoWhiteboardViewImageCustom, only network images are supported, and the image size limit is 500KB.
- Related callbacks: ZegoSuperBoardSubViewBlock.
- When to call: this is called when currentSuperBoardSubView exists.
- Available since: v2.0.0 .
clearSelected:complete:
- (void)clearSelected:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| complete | ZegoSuperBoardSubViewBlock | Operation result callback |
Details
Select some primitives through the selection tool of the whiteboard, and call this method to delete the selected primitives.
- Related callbacks: ZegoSuperBoardSubViewBlock
- When to call: After getting the SuperBoardSubView list.
- Available since: v2.0.0.
setBackgroundImageWithPath:imagePath:mode:complete:
- (void)setBackgroundImageWithPath:(NSString *) imagePath mode:(ZegoSuperBoardViewImageFitMode) mode complete:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| imagePath | NSString * | The background image path, local path or network path can be used (network image only supports https). Example: "xxxxxxxxxx.png", " ". |
| mode | ZegoSuperBoardViewImageFitMode | Background image fill mode |
| complete | ZegoSuperBoardSubViewBlock | Callback when the background image is set |
Details
Set a background image to the whiteboard, support local path or network path, this background image will be synchronized to other users in the room.
- Related callbacks: ZegoSuperBoardSubViewBlock.
- When to call: After Get the SuperBoardSubView list.
- Available since: v2.0.0.
clearBackgroundImageWithComplete:complete:
- (void)clearBackgroundImageWithComplete:(ZegoSuperBoardSubViewBlock) complete;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| complete | ZegoSuperBoardSubViewBlock | Clear background completion callback |
Details
Clear the background image of the whiteboard, this action will be synchronized to other users in the room.
- Related callbacks: ZegoSuperBoardSubViewBlock.
- When to call: Get the SuperBoardSubView list.
- Available since: v2.0.0.
stopPlayPPTVideo
- (void)stopPlayPPTVideo;ZegoSuperBoardSubView.hStop the video currently being played on the dynamic ppt page, generally used to stop the audio and video playback of the dynamic PPT file when switching files.
- When to call: Called during audio and video playback after the file has been successfully loaded.
- Available since: v2.0.0.
setWhiteboardBackgroundColor:color:
- (void)setWhiteboardBackgroundColor:(UIColor *) color;ZegoSuperBoardSubView.hParameters
| Name | Type | Description |
|---|---|---|
| color | UIColor * | White Board Color |
Details
Set the background color of the whiteboard, for example, set the pure whiteboard to gray. It only takes effect locally and will not be synchronized to other users.
- When to call: Can be called directly when the SuperBoardSubView object is obtained
- Available since: v2.0.0
ZegoSuperBoardSubViewModel
Details
Data model class that contains the name of the ZegoSuperBoardSubView that was created, the time it was created, the ID of the contained file, the type of the file, and the unique identifier of the ZegoSuperBoardSubView object.
- Use cases: :The user obtains the ID, name and file information of the corresponding ZegoSuperBoardSubView object.
Declared in ZegoSuperBoardSubViewModel.h
Properties
name
nonatomic, copy NSString * nameName of SuperBoardSubView
createTime
nonatomic,assign NSUInteger createTimeWhiteboard Creation Time Unix timestamp (milliseconds)
fileID
nonatomic,copy NSString * fileIDFile ID, which is unique
fileType
nonatomic,assign NSUInteger fileTypeFile type, refer to ZegoSuperBoardFileType
uniqueID
nonatomic,copy NSString * uniqueIDSuperBoardSubview ID, This ID is unique.
whiteboardIDList
nonatomic,strong NSArray * whiteboardIDListA list of whiteboard IDs
ZegoSuperBoardView
Details
This class mainly realizes the function of switching SuperBoardSubView and Excel file sheet in SuperBoardSubView. After initializing SDK, You can get the ZegoSuperBoardView object directly using the ZegoSuperBoardManager, through the outside of the class does not need to deal with the ZegoSuperBoardView switching and synchronization logic, ZegoSuperBoardView handles the logic for switching synchronised presentations internally.
- Use cases: Simplify the complexity of accessing the SDK and don't want to deal with too much switching ZegoSuperBoardView logic.
- Caution: To use ZegoSuperBoardView, you need to turn on enableSuperBoardView. The default is on.
Declared in ZegoSuperBoardView.h
Properties
currentSuperBoardSubView
nonatomic,strong,readonly ZegoSuperBoardSubView * currentSuperBoardSubViewThe SuperBoardSubView that should currently be displayed at the top of the view
delegate
Methods
switchSuperBoardSubView:uniqueID:complete:
- (void)switchSuperBoardSubView:(NSString *) uniqueID complete:(ZegoSuperBoardSwitchBlock) complete;ZegoSuperBoardView.hParameters
| Name | Type | Description |
|---|---|---|
| uniqueID | NSString * | Unique IDENTIFIER of the SuperBoardSubView |
| complete | ZegoSuperBoardSwitchBlock | Toggle the result callback of SuperBoardSubView |
Details
Supported version: 2.0.0 and above.
Detailed description: switch to the specified SubView, multi-terminal synchronization.
Related callback: ZegoSuperBoardSwitchBlock.
switcSuperBoardSubView:uniqueID:sheetIndex:complete:
- (void)switcSuperBoardSubView:(NSString *) uniqueID sheetIndex:(int) sheetIndex complete:(ZegoSuperBoardSwitchBlock) complete;ZegoSuperBoardView.hParameters
| Name | Type | Description |
|---|---|---|
| uniqueID | NSString * | Unique IDENTIFIER of the SuperBoardSubView |
| sheetIndex | int | Excel sheetIndex |
| complete | ZegoSuperBoardSwitchBlock | Result callback switching Excel |
Details
Switches Excel from the specified SuperBoardSubView to the specified sheet.
- Use cases: Switch to Excel Sheet.
When to call
after the file is loaded.Use restrictions: Only Excel files are supported.
- Available since: v2.0.0
Return
Operation result
ZegoUploadCustomH5Config
Details
Custom H5 courseware property construction class can set the width, height, page number and thumbnail information of custom courseware.
- Use cases: It needs to be passed in the interface of uploading custom H5 courseware.
Declared in ZegoUploadCustomH5Config.h
Properties
width
nonatomic, assign CGFloat widthCustomize the width of H5 courseware
Required or not: Mandatory
- Value range: Greater than 0
- Available since: v2.0.0
height
nonatomic, assign CGFloat heightCustomize the height of H5 courseware.
Required or not: Mandatory
- Value range: Greater than 0
- Available since: v2.0.0
pageCount
nonatomic, assign NSInteger pageCountCustomize the number of pages of H5 courseware.
- Available since: v2.0.0
thumbnailList
nonatomic, strong NSArray<NSString *> * thumbnailListCustomize H5 courseware thumbnail relative path array.
- Required: optional parameters
- Available since: v2.0.0


