Trait UITextSelectionHandleView

Source
pub unsafe trait UITextSelectionHandleView: UICoordinateSpace + MainThreadOnly {
    // Provided methods
    unsafe fn direction(&self) -> NSDirectionalRectEdge
       where Self: Sized + Message { ... }
    unsafe fn setDirection(&self, direction: NSDirectionalRectEdge)
       where Self: Sized + Message { ... }
    unsafe fn isVertical(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn customShape(&self) -> Option<Retained<UIBezierPath>>
       where Self: Sized + Message { ... }
    unsafe fn setCustomShape(&self, custom_shape: Option<&UIBezierPath>)
       where Self: Sized + Message { ... }
    unsafe fn preferredFrameForRect(&self, rect: CGRect) -> CGRect
       where Self: Sized + Message { ... }
}
Available on crate features UITextSelectionHandleView and UIView only.
Expand description

A view that represents a selection handle drawn at the edges of contiguous selection ranges.

When a selection is ranged (i.e., length is > 0), and the device supports range adjustment via a gesture, selection handles (“lollipops”) are displayed at the edges of the contiguous selection (usually a UITextSelectionHighlightView).

See also Apple’s documentation

Provided Methods§

Source

unsafe fn direction(&self) -> NSDirectionalRectEdge
where Self: Sized + Message,

Available on crate feature UIGeometry only.

Controls which direction the handle is oriented. For example, NSDirectionalRectEdgeLeading indicates the handle is on the leading edge, so the dot will be rendered on top.

Source

unsafe fn setDirection(&self, direction: NSDirectionalRectEdge)
where Self: Sized + Message,

Available on crate feature UIGeometry only.

Setter for direction.

Source

unsafe fn isVertical(&self) -> bool
where Self: Sized + Message,

Convenience accessor for directioncalculations.

Source

unsafe fn customShape(&self) -> Option<Retained<UIBezierPath>>
where Self: Sized + Message,

Available on crate feature UIBezierPath only.

If applicable, a custom shape for the lollipop stem. Default is nil,which results in a rounded rect style based on bounds.

Source

unsafe fn setCustomShape(&self, custom_shape: Option<&UIBezierPath>)
where Self: Sized + Message,

Available on crate feature UIBezierPath only.

Setter for customShape.

Source

unsafe fn preferredFrameForRect(&self, rect: CGRect) -> CGRect
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

Provides a preferred frame given rectbased on the current appearance configuration.

Trait Implementations§

Source§

impl ProtocolType for dyn UITextSelectionHandleView

Source§

const NAME: &'static str = "UITextSelectionHandleView"

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 UITextSelectionHandleView

Implementations on Foreign Types§

Source§

impl<T> UITextSelectionHandleView for ProtocolObject<T>

Implementors§