Post

Replies

Boosts

Views

Activity

popover not closing
When I Press the save button the popover does not close Code         .popover(isPresented: $showingPopover) {             NavigationView {                 ModifyRecipeView(recipe: $recipe)                     .toolbar {                         ToolbarItem(placement: .navigationBarTrailing) {                             Button("Save") {                                 showingPopover = false                             }                         }                     }                     .navigationTitle("Edit Recipe")             }             .onDisappear {                 recipeData.saveRecipes()             }         }
0
0
279
Jul ’22
many Errors in Xcode
[QuestionView(question:viewModel.currentQuestion) Errors Cannot convert value of type 'Binding' to expected argument type 'Question' Referencing subscript 'subscript(dynamicMember:)' requires wrapper 'ObservedObject.Wrapper' Value of type 'GameViewModel' has no dynamic member 'currentQuestion' using key path from root type 'GameViewModel' Insert '$'
5
0
2.2k
Jan ’22
Expected Expression Error Swiftui
i get the expected expression error every time i restart Xcode i have tried numerous times to fix it here is the code import SwiftUI struct MainView: View {          var body: some View {                  Color(.secondarySystemBackground)         HStack{         }         NavigationView{                                       Text("")                 .navigationTitle("Home")                          } navigationBarItems(trailing: Button(action: { print("Hello") }) { Image(systemName: "square.and.pencil") .resizable() .frame(width: 50, height: 50) ) - Error Here             }         } } struct MainView_Previews: PreviewProvider {     static var previews: some View {         MainView()     } }
4
0
4.2k
Apr ’21