Trait UIFocusItemScrollableContainer

Source
pub unsafe trait UIFocusItemScrollableContainer: UIFocusItemContainer + MainThreadOnly {
    // Provided methods
    unsafe fn contentOffset(&self) -> CGPoint
       where Self: Sized + Message { ... }
    unsafe fn setContentOffset(&self, content_offset: CGPoint)
       where Self: Sized + Message { ... }
    unsafe fn contentSize(&self) -> CGSize
       where Self: Sized + Message { ... }
    unsafe fn visibleSize(&self) -> CGSize
       where Self: Sized + Message { ... }
}
Available on crate feature UIFocus only.
Expand description

Objects conforming to UIFocusItemScrollableContainer are updated accordingly to ensure the focused item remains visible on the screen.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn contentOffset(&self) -> CGPoint
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

The current content offset of this scrollable container. If the scrollable container has a bounds property, bounds.origin must be equal to contentOffset.

Source

unsafe fn setContentOffset(&self, content_offset: CGPoint)
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

Setter for contentOffset.

Source

unsafe fn contentSize(&self) -> CGSize
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

The total size of the content contained by this container. If this size exceeds the size of this container’s visible size, then scrolling is possible.

Source

unsafe fn visibleSize(&self) -> CGSize
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

The visible size of this scrollable container.

Trait Implementations§

Source§

impl ProtocolType for dyn UIFocusItemScrollableContainer

Source§

const NAME: &'static str = "UIFocusItemScrollableContainer"

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 UIFocusItemScrollableContainer

Implementations on Foreign Types§

Source§

impl<T> UIFocusItemScrollableContainer for ProtocolObject<T>

Implementors§

Source§

impl UIFocusItemScrollableContainer for UICollectionView

Available on crate feature UICollectionView only.
Source§

impl UIFocusItemScrollableContainer for UIScrollView

Available on crate feature UIScrollView only.
Source§

impl UIFocusItemScrollableContainer for UITableView

Available on crate feature UITableView only.
Source§

impl UIFocusItemScrollableContainer for UITextView

Available on crate feature UITextView only.