Open lightandshadow68 opened 2 years ago
Hi @lightandshadow68,
Thanks for this PR. Given your problem statement, I think you can do better here.
In SheetModifier.swift
, you can declare @Environment(\.colorScheme) private var colorScheme
.
This will collect the color scheme assigned outside of the sheet with .preferredColorScheme(..)
.
Then, you can automatically pass that to sheetHost.overrideUserInterfaceStyle
in the same file, without the necessity of exposing this property in UIViewControllerProxy
.
This PR allows overriding the interface style of the presented view controller. Specifically, it adds the ability to set the
overrideUserInterfaceStyle
property on the view controller before it is presented. This allows omitting the.preferredColorScheme(.dark)
modifier, which didn't seem to survive the presentation and retroactively caused interface style changes in the view calling.shee(
....