UITextSelectionHandleView

Trait UITextSelectionHandleView 

Source
pub unsafe trait UITextSelectionHandleView: UICoordinateSpace + MainThreadOnly {
    // Provided methods
    fn direction(&self) -> NSDirectionalRectEdge
       where Self: Sized + Message { ... }
    fn setDirection(&self, direction: NSDirectionalRectEdge)
       where Self: Sized + Message { ... }
    fn isVertical(&self) -> bool
       where Self: Sized + Message { ... }
    fn customShape(&self) -> Option<Retained<UIBezierPath>>
       where Self: Sized + Message { ... }
    fn setCustomShape(&self, custom_shape: Option<&UIBezierPath>)
       where Self: Sized + Message { ... }
    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

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

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

Available on crate feature UIGeometry only.

Setter for direction.

Source

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

Convenience accessor for directioncalculations.

Source

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

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

Available on crate feature UIBezierPath only.

Setter for customShape.

Source

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§