Post

Replies

Boosts

Views

Activity

Reply to SwiftData confusing crash
I have experienced the same behavior and have added a button to regularly delete the data. I feel that during the development, when the data structure changes frequently, the application becomes buggy. Perhaps this might help you. func removeStoredData() { do { try context.delete(model: WorkoutModelItem.self) } catch { fatalError(error.localizedDescription) } } Before you start user testing, for example, in TestFlight, you can disable the button again.
Feb ’24
Reply to swiftUI | Missing arguments...
Hi Noel, I would like to help you. Unfortunately, the code is incomplete, so I can only assist to a limited extent. Please make sure to use the 'Environment' during observation. I recommend watching the video https://www.youtube.com/watch?v=jD6c9y8CFGQ&t=1793s. Regarding the first error in 'HomePageView.swift:63:37,' 'Missing argument for parameter 'forUser' in call,' and the function 'getUserData' expects a 'forUser' parameter, which you do not pass when calling it in the 'onAppear' block. I'd be happy to assist you further if you post the entire code here.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’24
Reply to sf symbols right to left
Hi, you can use the environment modifier with the argument layouDirection and value rightToLeft like this: .environment(.layoutDirection, .rightToLeft) VStack { Image(systemName: "chart.bar.doc.horizontal.fill") .imageScale(.large) .foregroundColor(.mint) // right to left sfsymbol Image(systemName: "chart.bar.doc.horizontal.fill") .imageScale(.large) .foregroundColor(.mint) .environment(\.layoutDirection, .rightToLeft) } for more information https://developer.apple.com/videos/play/wwdc2022/10107/
Topic: Design SubTopic: General Tags:
Feb ’24