Thank you for your reply!
There is also a difference in the captured image.
Post
Replies
Boosts
Views
Activity
supplement:
repository.delete(id: "2") is doing realm delete transaction.
repository.object is getting realm object.
As far as I can tell, the only way to display the message is to use fatalError.
I quit the simulator once and started it again, and it fixed the problem. The cause is unknown.
I couldn't figure out how to change it with onInsert, but I did find out that DropProposal is involved.
By implementing it with onDrop, I was able to successfully turn it off.
when dragging
example code
struct ContentView: View {
@State private var dragging: Ramen?
@State private var ramens = [Ramen(name: "ramen", id: 0),
Ramen(name: "ramen2", id: 1),
Ramen(name: "ramen3", id: 2)]
var body: some View {
List {
ForEach(ramens) { ramen in
Image(ramen.name)
.onDrag {
self.dragging = ramen
return NSItemProvider(object: String(ramen.id) as NSString)
}
}
.onInsert(of: [.text], perform: insert)
}
}
private func insert(index: Int, _: [NSItemProvider]) {
...
}
}
in iOS15, refreshable is introduced!