Код: Выделить всё
private var alertsView: some View {
NavigationView {
Form {
HStack(spacing: 20) {
Button(action: {
showingAlertSetup = true
}) {
HStack {
Image(systemName: "plus")
Text("Add New Alert")
}
.padding()
.foregroundColor(.blue)
}
Spacer()
Button(action: {
// Action for adding a recurring alert
}) {
HStack {
Image(systemName: "plus")
Text("Add Recurring Alert")
}
.padding()
.foregroundColor(.blue)
}
}
.padding(.vertical, 8)
Section(header: Text("Active Alerts")) {
ForEach(alertSettings) { alert in
alertRow(for: alert)
}
.onDelete(perform: deleteAlert)
.listRowSeparator(.hidden)
}
}
.listStyle(PlainListStyle())
.navigationTitle("Alerts")
}
}
Я попытался использовать курсор, но не удалось.
Подробнее здесь: https://stackoverflow.com/questions/794 ... -container
Мобильная версия