Your First iOS & SwiftUI App: Polishing the App, Episode 4: Dark Mode | Kodeco, the new raywenderlich.com

Learn how to support dark mode in your iOS apps.


This is a companion discussion topic for the original entry at https://www.kodeco.com/28797859-your-first-ios-swiftui-app-polishing-the-app/lessons/4

Not seeing comments here… The horizontal preview layout was not working for me. In StackOverflow found that since XCode 14 you have to click on Selectable (lower left, off of Live) to see the horizontal preview.

You can add:

.previewInterfaceOrientation(.landscapeLeft)

to your landscape Previews to make them work as per the Tutorial but you need to also have iOS 15 or above in the Minimum Deployments in the Project Targets settings.

Although the current version of the tutorial was updated for Swift 5.5, iOS 15, Xcode 13, I think the change came in Xcode 14.

David

Kodeco have just posted an update to this tutorial that may address your concern. I haven’t checked it yet but will let you know when I have.

David