Skip to main content

UIColorPickerViewControllerDelegate

Trait UIColorPickerViewControllerDelegate 

Source
pub unsafe trait UIColorPickerViewControllerDelegate: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    fn colorPickerViewControllerDidSelectColor(
        &self,
        view_controller: &UIColorPickerViewController,
    )
       where Self: Sized + Message { ... }
    fn colorPickerViewController_didSelectColor_continuously(
        &self,
        view_controller: &UIColorPickerViewController,
        color: &UIColor,
        continuously: bool,
    )
       where Self: Sized + Message { ... }
    fn colorPickerViewControllerDidFinish(
        &self,
        view_controller: &UIColorPickerViewController,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature UIColorPickerViewController only.
Expand description

Provided Methods§

Source

fn colorPickerViewControllerDidSelectColor( &self, view_controller: &UIColorPickerViewController, )
where Self: Sized + Message,

👎Deprecated
Available on crate features UIResponder and UIViewController only.

Called when the selectedColor changes.

Source

fn colorPickerViewController_didSelectColor_continuously( &self, view_controller: &UIColorPickerViewController, color: &UIColor, continuously: bool, )
where Self: Sized + Message,

Available on crate features UIColor and UIResponder and UIViewController only.

Called when the selected color changes.

Parameter viewController: This color picker.

Parameter color: The new selected color

Parameter continuously: YES, if this update is part of a continuous user interaction (e.g. dragging through the spectrum). It’s recommended to show these updates in your UI but to not include them in any undo operations.

Source

fn colorPickerViewControllerDidFinish( &self, view_controller: &UIColorPickerViewController, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.

In presentations (except popovers) the color picker shows a close button. If the close button is tapped, the view controller is dismissed and colorPickerViewControllerDidFinish: is called. Can be used to animate alongside the dismissal.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn UIColorPickerViewControllerDelegate

Source§

impl ProtocolType for dyn UIColorPickerViewControllerDelegate

Source§

const NAME: &'static str = "UIColorPickerViewControllerDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> UIColorPickerViewControllerDelegate for ProtocolObject<T>

Implementors§