应用主题单例,为 UI 组件提供预配置的外观对象。
使用 AppTheme.shared 访问默认外观,或调用 setUp(theme:) 应用自定义主题。
let theme = AppTheme.shared| 方法 | 返回类型 | 描述 |
|---|---|---|
setUp(theme: AppThemeProtocol) |
Void |
应用符合 AppThemeProtocol 的自定义主题 |
import RealtimeKitUI
let theme = AppTheme.shared
let titleAppearance = theme.meetingTitleAppearance
let clockAppearance = theme.clockViewAppearanceimport RealtimeKitUI
class CustomTheme: AppThemeProtocol {
// Implement required appearance properties
}
let customTheme = CustomTheme()
AppTheme.shared.setUp(theme: customTheme)