ApiRTC iOS SDK Documentation

Class Whiteboard​View

open class WhiteboardView: UIView  

Whiteboard view

WhiteboardView WhiteboardView UIView UIView WhiteboardView->UIView Descriptable Descriptable WhiteboardView->Descriptable

Conforms To

UIView

Initializers

init(frame:​)

public required override init(frame: CGRect)  

init?(coder:​)

required public init?(coder aDecoder: NSCoder)  

Properties

mode

open private(set) var mode: WhiteboardViewMode = .preview  

cursor​Size

open private(set) var cursorSize  

Remote cursor size

arrow​Size

open private(set) var arrowSize  

Size of arrow tool triangle for the smallest brush size

frame

open override var frame: CGRect  

background​Image

open var backgroundImage: UIImage?  

on​Tap

open var onTap: ((_ location: CGPoint) -> Void)? 

Called only in preview mode

on​Double​Tap

open var onDoubleTap: ((_ location: CGPoint) -> Void)? 

Methods

set​Mode(_:​)

open func setMode(_ mode: WhiteboardViewMode)  

Sets the mode that may allow to handle touches or not

set​Cursor​Size(_:​)

open func setCursorSize(_ cursorSize: CGSize)  

set​Arrow​Size(_:​)

open func setArrowSize(_ arrowSize: CGSize)  

touches​Began(_:​with:​)

override open func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?)  

touches​Moved(_:​with:​)

override open func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?)  

touches​Ended(_:​with:​)

override open func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?)  

touches​Cancelled(_:​with:​)

open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?)  

set​Background​Image(_:​content​Mode:​)

open func setBackgroundImage(_ image: UIImage?, contentMode: ContentMode)