V8tr / ListCRUDSwiftUI

Add, Edit, Move, and Drag and Drop in SwiftUI List https://www.vadimbulavin.com/add-edit-move-and-drag-and-drop-in-swiftui-list/

Home Page:https://www.vadimbulavin.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drop to upper position

dobleperez opened this issue · comments

commented

Hello,
I was search how to reorder a list on SwiftUI using this technique and what a surprise find your code!
I was using your project only for reordering the list and I've found a couple issues:

  1. I notice that dropping to upper position, just one up, makes a row superposition. Two steps up works well
  2. On iPhone doesn't work the drag interaction

Thanks!

Hi Javi! Thanks for heads up. I'll revisit my tutorial. It may be that the behavior has changed since the time it was written. Or maybe it's just a bug in my code.

As for the drag, I am not sure that there is a way of entering a split-screen mode on iPhone. I think it's more an iPad feature.

Hi @V8tr, I found a question on SO related to this issue

I've run this code on iOS 13.4 with Xcode 11.4 and it worked fine. Am I missing something or maybe it was fixed on SwiftUI side?

simulator

can you notice that when you perform reorder UI jumps like a crazy? In my understanding this is the core issue. Example you can try to reorder over than one row and cell will stay exact at the place where you put it

Yeah, I can see the problem now. Not sure if there is a fix with the current state of SwiftUI.