ApiRTC iOS SDK Documentation

Class Whiteboard​Client

open class WhiteboardClient: Observable<WhiteboardEvent>  

WhiteboardClient using to control whiteboard tools, colors, views etc

WhiteboardClient WhiteboardClient Descriptable Descriptable WhiteboardClient->Descriptable Observable<WhiteboardEvent> Observable<WhiteboardEvent> WhiteboardClient->Observable<WhiteboardEvent>

Conforms To

Observable<WhiteboardEvent>

Properties

view

open private(set) weak var view: WhiteboardView? 

Actual whiteboard view

color

open private(set) var color: UIColor = .black  

cursor​Color

open private(set) var cursorColor: UIColor = .black

brush​Width

open private(set) var brushWidth: Int = 1  

font​Size

open private(set) var fontSize: Int = 20  

can​Undo

open var canUndo: Bool  

can​Redo

open var canRedo: Bool  

show​Cursors

open private(set) var showCursors: Bool = true  

Turns on remote cursors

tool

open private(set) var tool: WhiteboardTool = .pen  

sheet​Id

open private(set) var sheetId: Int = 1

Active sheet id

can​Take​Snapshot

open var canTakeSnapshot: Bool  

is​Owned

open var isOwned: Bool  

Methods

set​View(_:​)

open func setView(_ view: WhiteboardView)  

Sets whiteboard view

set​Color(_:​)

open func setColor(_ color: UIColor)  

Sets tool color

set​Cursor​Color(_:​)

open func setCursorColor(_ cursorColor: UIColor)  

Sets cursor color

set​Brush​Width(_:​)

open func setBrushWidth(_ brushWidth: Int)  

Sets brush width

set​Font​Size(_:​)

open func setFontSize(_ fontSize: Int)  

Sets font size

set​Show​Cursors(_:​)

open func setShowCursors(_ showCursors: Bool)  

Sets whether to show cursors or not

set​Tool(_:​)

open func setTool(_ tool: WhiteboardTool)  

Sets actual tool

undo()

open func undo()  

redo()

open func redo()  

set​Background​Image​Url(_:​)

open func setBackgroundImageUrl(_ url: URL)  

create​New​Sheet()

open func createNewSheet()  

Creates new whiteboard sheet

add​Text(_:​at​Point:​)

open func addText(_ text: String, atPoint point: CGPoint)  

Adds given text at given point

take​Snapshot()

open func takeSnapshot() -> UIImage?  

Takes snapshot

on​Event(_:​_:​)

open override func onEvent(_ observer: AnyObject, _ callback: @escaping ((WhiteboardEvent) -> Void))