Thanks. I’ve submitted FB15430726 on this issue with a minimal test project to reproduce the issue.
Post
Replies
Boosts
Views
Activity
It is not just you. There are a few threads here talking about this including https://developer.apple.com/forums/thread/759542.
There is the issue you mentioned and another that causes the “back” navigation to display views that were previously in the NavigationPath stack, but shouldn’t be at the time they are displayed. Specifically within tabs.
Developers on that thread mention that the latest beta for 18.1 appears to fix the issue and also provide a couple of workarounds for 18.0.
Well, after creating a minimal project to demonstrate the issue using the IOS App template from Xcode, I found that the following code does indeed work as expected:
context.processPendingChanges()
context.undoManager?.disableUndoRegistration()
// Make changes that you don't want to record in the undo stack.
context.processPendingChanges()
context.undoManager?.enableUndoRegistration()
I will work to figure out where my error is in my app.
Thanks for your response.
Thanks. That does’t work here though because I’m not plotting any data to the chart that uniquely identifies a given object (TaskGroup in my case) - just a name and some dates. I need to uniquely identify the TaskGroup being tapped to inject it into the detail view. I can’t really plot a UUID or a reference to the TaskGroup itself...
Any update on this? I have the same issue and is obviously not a beta issue at this point. Thanks.
Came here with the same issue but then also found a thread discussing a modifier for photosPicker similar to .sheet (https://developer.apple.com/forums/thread/713564)
.toolbar {
ToolbarItem(placement: .primaryAction) {
Menu {
Button {
showingPhotosPicker.toggle()
} label: {
Label("Add Photo", systemImage: "photo.on.rectangle")
}
} label: {
Label ("More", systemImage: "ellipsis.circle")
}
}
}
.photosPicker(isPresented: $showingPhotosPicker, selection: $selectedItems, matching: .any(of: [.images, .screenshots, .livePhotos]))
}