Trait UITextFormattingViewControllerDelegate

Source
pub unsafe trait UITextFormattingViewControllerDelegate: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    unsafe fn textFormattingViewController_didChangeValue(
        &self,
        view_controller: &UITextFormattingViewController,
        change_value: &UITextFormattingViewControllerChangeValue,
    )
       where Self: Sized + Message { ... }
    unsafe fn textFormattingViewController_shouldPresentFontPicker(
        &self,
        view_controller: &UITextFormattingViewController,
        font_picker: &UIFontPickerViewController,
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn textFormattingViewController_shouldPresentColorPicker(
        &self,
        view_controller: &UITextFormattingViewController,
        color_picker: &UIColorPickerViewController,
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn textFormattingDidFinish(
        &self,
        view_controller: &UITextFormattingViewController,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature UITextFormattingViewController only.
Expand description

Provided Methods§

Source

unsafe fn textFormattingViewController_didChangeValue( &self, view_controller: &UITextFormattingViewController, change_value: &UITextFormattingViewControllerChangeValue, )
where Self: Sized + Message,

Available on crate features UIResponder and UITextFormattingViewControllerChangeValue and UIViewController only.

Delegate method that will be invoked on any text formatting changes.

  • Parameters:
  • viewController: Text formatting controller in which action was performed.
  • changeValue: Object describing the change made via view controller.
Source

unsafe fn textFormattingViewController_shouldPresentFontPicker( &self, view_controller: &UITextFormattingViewController, font_picker: &UIFontPickerViewController, ) -> bool
where Self: Sized + Message,

Available on crate features UIFontPickerViewController and UIResponder and UIViewController only.

If implemented, text formatting will call this method before presenting font picker controller. Use this method to make any presentation modifications or to prevent presentation altogether.

If you decide to prevent presentation of font picker via text formatting controller, you may present provided font picker yourself. In this case, you will have to handle any font picker actions independently.

  • Parameters:
  • viewController: Text formatting controller that is attempting to present font picker controller
  • fontPicker: Font picker controller that will be presented.
  • Returns: Flag indicating if text formatting controller should present font picker.
Source

unsafe fn textFormattingViewController_shouldPresentColorPicker( &self, view_controller: &UITextFormattingViewController, color_picker: &UIColorPickerViewController, ) -> bool
where Self: Sized + Message,

Available on crate features UIColorPickerViewController and UIResponder and UIViewController only.

If implemented, text formatting will call this method before presenting color picker controller. Use this method to make any presentation modifications or to prevent presentation altogether.

You may decide to prevent presentation of color picker via text formatting controller. In that case, you may present provided color picker controller yourself, but you will have to handle any actions in that controller separately.

  • Parameters:
  • viewController: Text formatting controller that is attempting to present font picker controller
  • colorPicker: Color picker controller that will be presented.
  • Returns: Flag indicating if text formatting controller should present font picker.
Source

unsafe fn textFormattingDidFinish( &self, view_controller: &UITextFormattingViewController, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.

Informs the delegate that user has dismissed text formatting view controller.

Trait Implementations§

Source§

impl ProtocolType for dyn UITextFormattingViewControllerDelegate

Source§

const NAME: &'static str = "UITextFormattingViewControllerDelegate"

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
Source§

impl<T> ImplementedBy<T> for dyn UITextFormattingViewControllerDelegate

Implementations on Foreign Types§

Source§

impl<T> UITextFormattingViewControllerDelegate for ProtocolObject<T>

Implementors§