I need to be able to undo / redo the colors that are picked with the new SwiftUI ColorPicker ( on the iPad : it's presented as a floating window )
The thing that makes my job very difficult is that there is apparently no way to know that *the user has indeed chosen a color ( and therefore closed the panel )*
Instead, the behavior of ColorPicker is that it will keep updating the binded color as the user is manipulating the color controls. This is very helpful to show a live preview, but you don't want to register all these color variations for undo / redo purposes : you only want the color that was finally picked.
Therefore there is no logical distinction between the colors that the user *tried*, and the one that was *selected*
And I looked everywhere : there aren't any modifiers or notifications related to that.
I know SwiftUI hasn't been there for long, but this seems like a crucial functionality that's missing!
Has anyone found a workaround?
Post
Replies
Boosts
Views
Activity
Hi, is there a way to switch an app from auto renewable subscription to paid ( single time ), leaving the users who paid for the subscription owners of the paid app - They wouldn't have to pay anymore - ?
is there a complete tutorial or example on how to integrate Metal with SwiftUI? There only seems to be some scattered questions and answers around the web about this subject.
I have a metal kernel function that has a huge array of data for input, stored in device memory, and I'm basically using one element per thread for further processing.device Element *elements [[ buffer(0) ]],I'm wondering what's better in terms of performance? :Make a copy of the array element into local thread memory :Element element = elements[thread_id];Or, use a pointer to that element :device Element *element = &particles[thread_id];