Conversation

Fahim Farook

Honestly, how does anybody get anything done with #SwiftUI for non-trivial apps? You can’t do multi-selection in grid views. So if you have an app with a lot of items and want to delete multiple items, the user has to delete them one by one?

Say you get beyond that issue by adding some sort of a selection list, but then you hit the issue of deleting multiple items at once not updating the grid.

And if you get beyond that too, but then you want to do drag and drop with your multiple selections? As far as I can tell, no real way to do that at all! Multiple drop is supported, but not multiple drag. How does that make sense?

I had an app which had progressed to functional level before I hit all these issues. Now I’m seriously thinking of going back and re-wrting from scratch with AppKit since apparently SwiftUI is really not yet ready for this kind of usage …

After almost four years of SwiftUI, I would have hoped Apple was further along than this 😞

Or am I missing something obvious? (That’s always possible …)

#Coding #macOS #Apple
3
0
1

@f It is remarkable how clumsy it is, in general. And how there aren't good non-GUI ways of accomplishing a number of development tasks.

1
0
0

@f in the Photos app, I can press and hold over an image grid and I select all image below my finger’s path. Does that help?

1
0
0
@invisv I keep coming back to it every year since somebody or other raves about how great #SwiftUI is and every single time, I’m disappointed because it can’t do some of the things I want to do.

I don’t know if I expect way too much or everybody else just does UIs differently … But that’s where I’ve ended up this time too. I think I’m putting SwiftUI away and going back to AppKit for another year 🙂
0
0
1
@UweHahne Unfortunately, while I know that the interaction works in Apple apps, the issue is in trying to code that yourself 🙂 There doesn’t seem to be any documentation indicating how you can do it yourself using #SwiftUI and any docs that are around seem to indicate that you actually *can’t* do multiple selection (or handle multiple selection) in code …

So for all I know, the Photos app doesn’t use #SwiftUI? I don’t know …
0
0
0

@f I’m pretty much struggling with that right now. List implementation in is pretty lacking, considering that it is probably the most common thing in any app I’m surprised!

It recalls me a lot of early React Native list issues, but at least I gave the benefit of the doubt there since it wasn’t fully native!

2
0
0

@oscb @f yeah I’ve not attempted to roll my own multi-selection / edit mode on grid, but I certainly have rolled my own List replacement with custom edit mode and selection because List is so opinionated and restrictive that it isn’t very good for building custom list UI. It’s great for standard old fashioned table views that look like classic iOS but that’s it.

1
0
0
@oscb I'm sorry that you have to go through that. I thought lists were badly implemented when SwiftUI first came out but a lot of things were rough at that point and so I let a few years go by (while checking every years or so) and thought maybe this time around things would be better since a couple of people I know were raving about SwiftUI. But unfortunately, it doesn't look as if it has progressed enough ...

If there's anyway I can help you with your list stuff, let me know since I did a lot of research into this but finally gave up. I started redoing my app as an AppKit app yesterday because there are features that I just have to have and SwiftUI just doesn't seem to be flexible enough to let me code it myself even ..
0
0
0
@gavinmckenzie As I was telling @oscb in a reply, I've just given up on SwiftUI yet again ... Maybe next year 😛

I did get the multi-selection working for grids, but then drag and drop turned out to be one item at a time and there apparently is no way around that (yet). Since there is no way to even code an alternate solution, my verdict at the moment is that SwiftUI is just not ready ...
0
0
0