Post

Replies

Boosts

Views

Activity

DismissAction or PresentationMode from Environment break Accent Color on presented sheets?
Anyone else notice that the DismissAction or PresentationMode will break accent color on sheets? struct ContentView: View { // Un-comment either of the below lines, and the tint color of SheetView becomes gray, rather than red. // @Environment(\.dismiss) var dismiss // @Environment(\.presentationMode) var presentationMode @State var sheetPresented = false var body: some View { Button("Show Sheet") { sheetPresented.toggle() } .sheet(isPresented: $sheetPresented) { SheetView() .accentColor(.red) } } } struct SheetView: View { @Environment(\.dismiss) var dismiss var body: some View { Button("Dismiss") { dismiss() } .foregroundColor(.accentColor) } }
4
0
1.2k
Aug ’21
iOS 26: TextEditor and Text Attachments
Does the new TextEditor in iOS 26, which supports rich text / AttributedString, also support the ability to add text attachments or tokens? For example, in Xcode, we can type <#foo#> to create an inline text placeholder/token which can be interacted with in a different way than standard text.
Replies
1
Boosts
0
Views
190
Activity
Jun ’25
DismissAction or PresentationMode from Environment break Accent Color on presented sheets?
Anyone else notice that the DismissAction or PresentationMode will break accent color on sheets? struct ContentView: View { // Un-comment either of the below lines, and the tint color of SheetView becomes gray, rather than red. // @Environment(\.dismiss) var dismiss // @Environment(\.presentationMode) var presentationMode @State var sheetPresented = false var body: some View { Button("Show Sheet") { sheetPresented.toggle() } .sheet(isPresented: $sheetPresented) { SheetView() .accentColor(.red) } } } struct SheetView: View { @Environment(\.dismiss) var dismiss var body: some View { Button("Dismiss") { dismiss() } .foregroundColor(.accentColor) } }
Replies
4
Boosts
0
Views
1.2k
Activity
Aug ’21