Приложение Apple Reminders:

Мое приложение:

Вот код простого отдельного проекта, который я создал, чтобы попытаться добиться этого:
Код: Выделить всё
@main
struct Test1App: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
struct ContentView: View {
@State private var isSheetShown = false
var body: some View {
Button("Show Sheet") {
isSheetShown = true
}
.sheet(isPresented: $isSheetShown) {
SheetView()
}
}
}
struct SheetView: View {
@State private var title = ""
var body: some View {
NavigationStack {
Form {
TextField("Title", text: $title)
}
.navigationTitle("New Reminder")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button("Cancel", role: .cancel) {}
}
ToolbarItem(placement: .confirmationAction) {
Button("Save") {}
}
}
}
}
}
Что я пробовал
- Добавление раздела с пустым заголовком
Код: Выделить всё
Form {
Section(header: Text("")) {
TextField("Title", text: $title)
}
}
- Настройка .listSectionSpacing
Код: Выделить всё
Form {
Section(header: Text("")) {
TextField("Title", text: $title)
}
}
.listSectionSpacing(80)
Любая помощь будет оценена по достоинству.
Подробнее здесь: https://stackoverflow.com/questions/788 ... orm-when-u
Мобильная версия