mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-25 11:02:48 +02:00
Begin implementing an onboarding flow.
This commit is contained in:
@@ -19,7 +19,7 @@ import SwiftUI
|
||||
|
||||
/**
|
||||
UIHostingController that applies some app-level specific configuration
|
||||
(E.g. `vectorContent` modifier and themeing to the NavigationController container.
|
||||
(E.g. `vectorContent` modifier and theming to the NavigationController container.
|
||||
*/
|
||||
@available(iOS 14.0, *)
|
||||
class VectorHostingController: UIHostingController<AnyView> {
|
||||
@@ -28,6 +28,19 @@ class VectorHostingController: UIHostingController<AnyView> {
|
||||
|
||||
private var theme: Theme
|
||||
|
||||
// MARK: Public
|
||||
|
||||
/// When `true` the presented view will have its orientation fixed to portrait on iPhone.
|
||||
var isLockedToPortraitOnPhone = false
|
||||
|
||||
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
||||
if isLockedToPortraitOnPhone && UIDevice.current.isPhone {
|
||||
return .portrait
|
||||
}
|
||||
|
||||
return super.supportedInterfaceOrientations
|
||||
}
|
||||
|
||||
init<Content>(rootView: Content) where Content: View {
|
||||
self.theme = ThemeService.shared().theme
|
||||
super.init(rootView: AnyView(rootView.vectorContent()))
|
||||
|
||||
Reference in New Issue
Block a user