Post not yet marked as solved
Post marked as unsolved with 0 replies, 412 views
I want to drive SwiftUI views with the new @FetchRequestproperty wrapper from the results of a fetch request. The first level, so just using a Text in the same struct where the fetch request is used, works fine and the view is updated if core data changes. If I integrate a LandmarkRow(landmark: landmark)this will not be updated anymore (but if copied the exact same code to the main view, it works)Essentially I want to include views with the details as in the landmarks tutorial:ForEach(userData.landmarks) { landmark in
if !self.userData.showFavoritesOnly || landmark.isFavorite {
NavigationLink(destination: LandmarkDetail(landmark: landmark)) {
LandmarkRow(landmark: landmark)
}
}
}Maybe there is a tutorial or some more information on how to use @FetchRequst and inherited views correctly?Any idea on how to proceed?