The code IS called when the user clicks on a delete button. Id like to animate the deletion .. how else can that be done if we done wrap it in an animation block?
Post
Replies
Boosts
Views
Activity
That was it. Using a batch delete request in core data seems to work fine.
Here are the error message:
CoreData`+[NSManagedObjectContext Multithreading_Violation_AllThatIsLeftToUsIsHonor]:
0x1cddb5424 <+0>: pacibsp
0x1cddb5428 <+4>: stp x29, x30, [sp, #-0x10]!
0x1cddb542c <+8>: mov x29, sp
0x1cddb5430 <+12>: bl 0x1d2bfcfb0
-> 0x1cddb5434 <+16>: brk #0x1
com.apple.SwiftUI.AsyncRenderer (15): EXC_BREAKPOINT (code=1, subcode=0x1cddb5434)
I have the same issue:
Here is my code:
Menu {
Picker("Topic", selection: $selectedTopic) {
Text("Unassigned")
.tag(nil as Topic?)
Divider()
ForEach(topics, id:.id) { topic in
Text(topic.name!).tag(topic as Topic?)
.foregroundColor(topic.foregroundColor)
}
}
}
label: {
Image(systemName: "circle.grid.3x3.circle")
.font(.system(size: 26,weight: .ultraLight))
.foregroundColor(learningSet.topic?.foregroundColor ?? .primary)
.frame(width:30, height: 30)
}
This correctly shows the menu and if I select an item, the .onchange fires like it should.
Problem is if the user clicks on some other view on the screen while the is active, it fires that views .onTappedGesture.
I tried different combinations of highPriorityGesture and SimultaneousGesture to no avail.
I also tried the approach of adding a full screen view In between the view with the menu and the underlying views and added an onTap to it. That approach works fine with one issue:
If the user click on the currency selected item, the .onChange for the picker doesn't fire, the menu disappears but its .onDisappear doesn't fire. So there is no way to know the menu is no longer visible, and hide my full screen view.
Any help would be greatly appreciated.
Thanks.
Did you ever resolve this? I have the same issue.
Thanks
I'm getting the same error after upgrading to the latest version of Xcode, IOS and MacOs. Not sure which one is causing the issue.
Anyone figure this out yet?
Thanks.