mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
Add Simple Template Example
- Add a simple Template example that shows a user profile with avatar, displayName and presence. - ScreenCoordinator: closure based with less protocols and delegates. - Reducer: Reducer function that manages all state modifications. - SwiftUI View: Decomposes UI into appropriate sub components. - Uses Theme and Dependency Management Infrastructure
This commit is contained in:
@@ -27,12 +27,21 @@ class VectorHostingController: UIHostingController<AnyView> {
|
||||
// MARK: Private
|
||||
|
||||
private var theme: Theme
|
||||
|
||||
init() {
|
||||
self.theme = ThemeService.shared().theme
|
||||
super.init(rootView: AnyView(EmptyView()))
|
||||
}
|
||||
|
||||
init<Content>(rootView: Content) where Content: View {
|
||||
self.theme = ThemeService.shared().theme
|
||||
super.init(rootView: AnyView(rootView.vectorContent()))
|
||||
}
|
||||
|
||||
func setRoot<V: View>(view: V) {
|
||||
rootView = AnyView(view)
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
fatalError("VectorHostingViewController does not currently support init from nibs")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user