Skip to main content

UITextSelectionHighlightView

Trait UITextSelectionHighlightView 

Source
pub unsafe trait UITextSelectionHighlightView: UICoordinateSpace + MainThreadOnly {
    // Provided methods
    fn selectionRects(&self) -> Retained<NSArray<UITextSelectionRect>>
       where Self: Sized + Message { ... }
    fn setSelectionRects(&self, selection_rects: &NSArray<UITextSelectionRect>)
       where Self: Sized + Message { ... }
}
Available on crate features UITextSelectionHighlightView and UIView only.
Expand description

A view that displays a tinted highlight behind rendered text to indicate selection.

When a selection is ranged (i.e., length is > 0), a highlight view is shown to indicate the selected text range.

See also Apple’s documentation

Provided Methods§

Source

fn selectionRects(&self) -> Retained<NSArray<UITextSelectionRect>>
where Self: Sized + Message,

Available on crate feature UITextInput only.

A collection of UITextSelectionRectsrepresenting the geometry of the current selection. Rects are expected to be in the receiver’s coordinate space.

Source

fn setSelectionRects(&self, selection_rects: &NSArray<UITextSelectionRect>)
where Self: Sized + Message,

Available on crate feature UITextInput only.

Setter for selectionRects.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn UITextSelectionHighlightView

Source§

impl ProtocolType for dyn UITextSelectionHighlightView

Source§

const NAME: &'static str = "UITextSelectionHighlightView"

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> UITextSelectionHighlightView for ProtocolObject<T>

Implementors§