Fixing Toolbar

This commit is contained in:
Patrick Müller 2020-12-21 11:24:57 +01:00 committed by Patrick Müller
parent 97bfa5ee8a
commit 13d11c2c2e
2 changed files with 26 additions and 4 deletions

View File

@ -10,5 +10,23 @@
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>CD9FAB7C258EC60200D6D0C5</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>CD9FAB92258EC60600D6D0C5</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>CD9FAB9D258EC60600D6D0C5</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View File

@ -25,14 +25,18 @@ struct ContentView: View {
}
.toolbar {
#if os(iOS)
ToolbarItem(placement: .bottomBar) {
EditButton()
}
#endif
ToolbarItem(placement: .bottomBar) {
Button(action: addItem) {
Label("Add Item", systemImage: "plus")
}
}
}
}
private func addItem() {
withAnimation {