Post

Replies

Boosts

Views

Activity

Reply to Incorrect color for inline navigation bar title when dark mode AND reduce transparency ON.
I came across the same bug: When in .dark mode AND reduced transparency, OS picks in the assets the Any Luminosity variant instead of the dark one for the inline title (not the large title). I have a Color with 4 variants: light/dark x normal/high-contrast. I apply it to navigationTitle with a UIKit function: .onAppear { setTitleMyColor(.text) } // apply TextColor from the assets And I used the following workaround in this UIKit function: import UIKit import SwiftUI /// A function relying on UIKit to force the navigation title color @MainActor func setTitleUIColor(_ color:UIColor) { // iOS bug workAround: if reducedTransparency and dark mode are both enabled, // For the inline title only (not the largeTitle) // iOS picks in the assets the Any Luminosity variant instead of the dark one let colorFixed = UIAccessibility.isReduceTransparencyEnabled ? .systemGray: color let appearance = UINavigationBarAppearance() appearance.titleTextAttributes = [.foregroundColor: colorFixed] appearance.largeTitleTextAttributes = [.foregroundColor: color] UINavigationBar.appearance().standardAppearance = appearance } @MainActor func setTitleMyColor(_ myColor: Color = .accent) { let titleColor = UIColor(myColor) setTitleUIColor(titleColor) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’25
Reply to I have a problem
Hello hah007, I have been in a similar starting point early this week, and everything went fine thanks to the Apple teams (the French ones) in about 48 hours, from the point where I had everything ready on my side. I would give the following advice: Slow down, double check your list of items. If you are just starting, there is a tremendous lot of things to learn to get in the Apple ecosystem. May be you did not get an answer because you asked in the wrong place ? As an example, you may have noticed you asked for help in the accessibility and inclusion forum, which is not about giving you access but about features intended for people with disabilities. ask for support directly, live on the phone. For me they called back in less than a minute, and were really helpful and empathetic. Try it here: https://developer.apple.com/contact/topic/select
Sep ’25
Reply to Undo/Redo with DragGesture
Hi Tomato, You started quite well. If you add the following line as your TextView's body first for debugging help: let _ = Self._printChanges() It will help you realize that when undoing, your textView's body is not recalculated. It means that nothing has changed for SwiftUI. Of course, undoModel.point did change, but this property is not used to compute the view's body, so a change won't trigger a refresh. To check further you could mirror undoModel.point into the position property, on which the TextView's body depends, eg by adding the following modifier : .onChange(of:undoModel.point) { _, newValue in position = newValue } and then undo works as expected. This proposal only intends to point out what was missing. I assume that a complete fix would avoid copying from position to point and then back again to position, possibly by using a single property instead of 2.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’25