We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae29bda commit 118dad9Copy full SHA for 118dad9
Movie DB/Views/Detail/Components/NotesView.swift
@@ -44,12 +44,17 @@ struct NotesView: View {
44
fileprivate struct EditView: View {
45
@Binding var notes: String
46
@Environment(\.colorScheme) private var colorScheme
47
+ @FocusState private var isFocused: Bool
48
49
var body: some View {
50
TextEditor(text: $notes)
51
+ .focused($isFocused)
52
.textInputAutocapitalization(.sentences)
53
.padding(5)
54
.navigationTitle(Strings.Detail.notesNavBarTitle)
55
+ .onAppear {
56
+ isFocused = true
57
+ }
58
}
59
60
@@ -70,5 +75,4 @@ struct NotesView: View {
70
75
NavigationStack {
71
76
NotesView.EditView(notes: .constant("This one is being edited."))
72
77
73
- .previewDisplayName("Editing View")
74
78
0 commit comments