April 2020
Beginner
316 pages
8h 20m
English
Sometimes, we'll want to perform a quick test in the actual simulator rather than the automatic preview window. As we've not yet actually hooked up our view to the existing code, we won't be able to run the app in its current state and see our new View. However, we can make a small tweak with a view to performing a quick test (as long as we remember to revert it back).
Head on over to SceneDelegate.swift and take a look inside. SceneDelegate is generated as part of the project when we first create it. SwiftUI uses this to set up our views and entry points for the app. As you can see, our ContentView is referenced here, which is currently our main View.
To make this quick change, replace the first ContentView ...
Read now
Unlock full access