Post

Replies

Boosts

Views

Activity

Reply to SecureField dots invisible in dark mode when iOS suggests and fills a strong password
@SergioDCQ Thanks for the interesting observation. I didn't copy your code but looking at the dark setting I got the idea of what is happening, I think. When iOS suggests and fills a strong password, it forces the underlying TextField's background to yellow and its text color to black (to ensure the text is readable against the yellow highlight). When the yellow highlight fades out, the system is supposed to restore the original text color. However, because you are using a hardcoded color (colorScheme == .dark ? .white : .black) Since SwiftUI's state hasn't changed, it never re-applies the .white color, leaving you with invisible black dots on a black background. Instead of manually switching between .white and .black, use SwiftUI's semantic .primary color (or Color(uiColor: .label)). Replace your .foregroundColor modifiers on the TextFields with .foregroundStyle(.primary) you can force SwiftUI to re-apply the text color by slightly changing the color value when the password is autofilled. By toggling between pure white and 99% opaque white, SwiftUI detects a state change and pushes the correct color back to the text field. Would be very interesting to play with a simple focus project to see if I understand correctly. Albert
  Worldwide Developer Relations. Thank you Albert. I tried foregroundStyle primary and systemBackground but the dots remain invisible on the confirm password field after autofill. I discovered that textFieldDidChangeSelection only fires on whichever field has focus when the password is suggested. The confirm field gets filled silently with no delegate callback or SwiftUI state change, so I have no hook to trigger the color re-apply. How would you suggest forcing the color update on a field that receives autofill without focus?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’26
Reply to Can I open two separate Xcode windows with the same project ?
I despise finding the answer less than 15 minutes after I posted the question. It's so embarrassing. Anyway, I really did a lot of Googling, with plenty of wrong answers. And then buried within the useless pile I found this: In Xcode's Project Navigator Window simply right-click the file you wish to view and select Open In a New Window. Not sure which is more embarrassing, that I found the answer after posting the question, or that the solution was so obvious and I didn't try it.
May ’24
Reply to SecureField dots invisible in dark mode when iOS suggests and fills a strong password
@SergioDCQ Thanks for the interesting observation. I didn't copy your code but looking at the dark setting I got the idea of what is happening, I think. When iOS suggests and fills a strong password, it forces the underlying TextField's background to yellow and its text color to black (to ensure the text is readable against the yellow highlight). When the yellow highlight fades out, the system is supposed to restore the original text color. However, because you are using a hardcoded color (colorScheme == .dark ? .white : .black) Since SwiftUI's state hasn't changed, it never re-applies the .white color, leaving you with invisible black dots on a black background. Instead of manually switching between .white and .black, use SwiftUI's semantic .primary color (or Color(uiColor: .label)). Replace your .foregroundColor modifiers on the TextFields with .foregroundStyle(.primary) you can force SwiftUI to re-apply the text color by slightly changing the color value when the password is autofilled. By toggling between pure white and 99% opaque white, SwiftUI detects a state change and pushes the correct color back to the text field. Would be very interesting to play with a simple focus project to see if I understand correctly. Albert
  Worldwide Developer Relations. Thank you Albert. I tried foregroundStyle primary and systemBackground but the dots remain invisible on the confirm password field after autofill. I discovered that textFieldDidChangeSelection only fires on whichever field has focus when the password is suggested. The confirm field gets filled silently with no delegate callback or SwiftUI state change, so I have no hook to trigger the color re-apply. How would you suggest forcing the color update on a field that receives autofill without focus?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’26
Reply to Xcode debugger seems slow
So it's definitely that Xcode wins the debugger over the phone via WiFi, and not the cable. Now if I could just figure how to turn that part off, without having to disable WiFi on my entire phone at the start of every work day.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Can I open two separate Xcode windows with the same project ?
I despise finding the answer less than 15 minutes after I posted the question. It's so embarrassing. Anyway, I really did a lot of Googling, with plenty of wrong answers. And then buried within the useless pile I found this: In Xcode's Project Navigator Window simply right-click the file you wish to view and select Open In a New Window. Not sure which is more embarrassing, that I found the answer after posting the question, or that the solution was so obvious and I didn't try it.
Replies
Boosts
Views
Activity
May ’24