Begin implementing an onboarding flow.

This commit is contained in:
Doug
2022-01-12 17:11:29 +00:00
parent 20b3c9918b
commit c64d851148
16 changed files with 1606 additions and 3398 deletions
@@ -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()))