Posts

Post not yet marked as solved
1 Replies
0 Views
As far as I can tell, the only way to display the message is to use fatalError.
Post marked as solved
2 Replies
0 Views
I quit the simulator once and started it again, and it fixed the problem. The cause is unknown.
Post marked as solved
2 Replies
0 Views
Post marked as solved
3 Replies
0 Views
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.
Post marked as solved
3 Replies
0 Views
when dragging
Post marked as solved
3 Replies
0 Views
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]) {     ...   } }
Post not yet marked as solved
31 Replies
0 Views
in iOS15, refreshable is introduced!