Open markst opened 2 years ago
Rendering preview's can be optimised by checking XCODE_RUNNING_FOR_PREVIEWS environment variable
XCODE_RUNNING_FOR_PREVIEWS
@AppBuilder override var body: AppBuilderContent { MainScene { .main } .mainScreen { // Avoid loading `ShowsListViewController` is rendering previews: if ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1" { return UIViewController() } return NavigationController(ShowsListViewController(viewModel: ShowsListViewModel())) .style(.transparent) .hideNavigationBar() } }
Rendering preview's can be optimised by checking
XCODE_RUNNING_FOR_PREVIEWS
environment variable