Trait UITextSelectionHighlightView

Source
pub unsafe trait UITextSelectionHighlightView: UICoordinateSpace + MainThreadOnly {
    // Provided methods
    unsafe fn selectionRects(&self) -> Retained<NSArray<UITextSelectionRect>>
       where Self: Sized + Message { ... }
    unsafe 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

unsafe 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

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

Available on crate feature UITextInput only.

Setter for selectionRects.

Trait Implementations§

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

impl<T> ImplementedBy<T> for dyn UITextSelectionHighlightView

Implementations on Foreign Types§

Source§

impl<T> UITextSelectionHighlightView for ProtocolObject<T>

Implementors§