Removing type: parameter in package products helped me fix SwiftUI previews:
.library(
name: "MyLib",
// type: .static,
targets: ["MyLib"]
)
Post
Replies
Boosts
Views
Activity
You can try this:
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground() // configure
let backItemAppearance = UIBarButtonItemAppearance()
backItemAppearance.normal.titleTextAttributes = [.foregroundColor : UIColor.white] // fix text color
appearance.backButtonAppearance = backItemAppearance
let image = UIImage(systemName: "chevron.backward")?.withTintColor(.white, renderingMode: .alwaysOriginal) // fix indicator color
appearance.setBackIndicatorImage(image, transitionMaskImage: image)
UINavigationBar.appearance().tintColor = .white // probably not needed
UINavigationBar.appearance().standardAppearance = appearance
UINavigationBar.appearance().scrollEdgeAppearance = appearance
UINavigationBar.appearance().compactAppearance = appearance
UINavigationBar.appearance().compactScrollEdgeAppearance = appearance