Post

Replies

Boosts

Views

Activity

Reply to How can you dismiss the new ColorPicker?
You can create a UIViewControllerRepresentable and add this following stub: func colorPickerViewControllerDidSelectColor(_ viewController: UIColorPickerViewController) {             self.colorPick.colors =  viewController.selectedColor               viewController.dismiss(animated: true, completion: nil)             }         } This dismisses the sheet right after a color selection. You can add a do - usleep function to add a slight delay after the color selection so that the user has an opportunity to change the color. I am looking into setting up a gesture instead of this method.
Nov ’20