В темном режиме текст белый. (Короткий) лист становится белым, когда фон белый, но текст в этом случае не становится черным.

Для воспроизведения:
Код: Выделить всё
@available(iOS 26, *)
struct MinimizedDetent: CustomPresentationDetent {
static let height: CGFloat = 50 // It must be short for it to trigger content color adaptivity
static func height(in context: Context) -> CGFloat? {
return Self.height
}
}
@available(iOS 26, *)
extension SwiftUI.PresentationDetent {
static let minimized = Self.custom(MinimizedDetent.self)
}
struct ContentView: View {
var body: some View {
ScrollView {
Color.black.frame(height: 600)
Color.white.frame(height: 600)
Color.black.frame(height: 600)
Color.white.frame(height: 600)
}
.sheet(isPresented: .constant(true)) {
if #available(iOS 26, *) {
HStack {
Text("What")
}
.presentationDetents([.minimized])
.presentationBackgroundInteraction(.enabled)
}
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... s-in-the-s
Мобильная версия