Advertisement
roman_herman

Swift color picker

Feb 15th, 2021
1,417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.58 KB | None | 0 0
  1.  
  2. let picker = UIColorPickerViewController()
  3.  
  4. present(picker, animated: true, completion: nil)
  5.  
  6. extension ViewController: UIColorPickerViewControllerDelegate {
  7.    
  8.     //  Called once you have finished picking the color.
  9.     func colorPickerViewControllerDidFinish(_ viewController: UIColorPickerViewController) {
  10.         //viewController.selectedColor
  11.        
  12.     }
  13.    
  14.     //  Called on every color selection done in the picker.
  15.     func colorPickerViewControllerDidSelectColor(_ viewController: UIColorPickerViewController) {
  16.         //viewController.selectedColor
  17.     }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement