一个为图像内容包装 UIImage 或 URL 的结构体。
在整个 UI Kit 中用于图标、头像和自定义图像。
| 参数 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
image |
UIImage? |
❌ | nil |
要显示的本地 UIImage |
url |
URL? |
❌ | nil |
用于加载图像的远程 URL |
import RealtimeKitUI
let rtkImage = RtkImage(image: UIImage(systemName: "mic"))import RealtimeKitUI
let rtkImage = RtkImage(url: URL(string: "https://example.com/avatar.png"))