Skip to content

RtkImage

A struct that wraps a UIImage or a URL for image content. Used throughout the UI Kit for icons, avatars, and custom images.

Initializer parameters

ParameterTypeRequiredDefaultDescription
imageUIImage?nilA local UIImage to display
urlURL?nilA remote URL to load the image from

Usage Examples

With a local image

Swift
import RealtimeKitUI
let rtkImage = RtkImage(image: UIImage(systemName: "mic"))

With a remote URL

Swift
import RealtimeKitUI
let rtkImage = RtkImage(url: URL(string: "https://example.com/avatar.png"))