April 2020
Beginner
316 pages
8h 20m
English
Now, you'll see me mention a couple of times during this book that SwiftUI is still in its infancy. At the time of writing this book, there was a known issue that when you tap on a NavigationBarItem in order to present a sheet (just like we are doing with our AddRecipeView), should you try to tap on the same button again (once said sheet is dismissed) without performing any other interaction, the button would simply be unclickable.
A temporary workaround discovered by the Apple community is to add the following highlighted code just before we create our NavigationBarItem:
.navigationBarTitle(Text(""), displayMode: .inline) // Hack due to bug in Xcode!.navigationBarItems(trailing: Button(action: { self.showAddRecipe.toggle() ...Read now
Unlock full access