UIFocusItemContainer

Trait UIFocusItemContainer 

Source
pub unsafe trait UIFocusItemContainer: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    fn coordinateSpace(&self) -> Retained<ProtocolObject<dyn UICoordinateSpace>>
       where Self: Sized + Message { ... }
    fn focusItemsInRect(
        &self,
        rect: CGRect,
    ) -> Retained<NSArray<ProtocolObject<dyn UIFocusItem>>>
       where Self: Sized + Message { ... }
}
Available on crate feature UIFocus only.
Expand description

Objects conforming to UIFocusItemContainer are responsible for providing which focus items they contain and where they are.

See also Apple’s documentation

Provided Methods§

Source

fn coordinateSpace(&self) -> Retained<ProtocolObject<dyn UICoordinateSpace>>
where Self: Sized + Message,

Available on crate feature UIView only.

The coordinate space of the focus items contained in this container. The focus items returned by focusItemsInRect: should report their frames in this coordinate space. If you are implementing this protocol, you may find it convenient to return the UIScreen as your coordinate space, and ensure that your contained items report their frames in screen space. Similarly, you might find that your focus items’ containing UIView or UIWindow is the most convenient coordinate space to use. You may also choose to implement your own object that conforms to UICoordinateSpace, if that is the most natural solution for your architecture.

Source

fn focusItemsInRect( &self, rect: CGRect, ) -> Retained<NSArray<ProtocolObject<dyn UIFocusItem>>>
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

Returns an array of all focus items within this container that intersect with the provided rect. rect is expressed in coordinateSpace. Note: starting in iOS & tvOS 16.0, UIView will return its subviews from this method. If you override this method in a UIView subclass, it will be your responsibility to call super and merge your array of custom focus items with UIView’s default focus items.

Trait Implementations§

Source§

impl ProtocolType for dyn UIFocusItemContainer

Source§

const NAME: &'static str = "UIFocusItemContainer"

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 UIFocusItemContainer

Implementations on Foreign Types§

Source§

impl<T> UIFocusItemContainer for ProtocolObject<T>

Implementors§

Source§

impl UIFocusItemContainer for UIActionSheet

Available on crate feature UIActionSheet only.
Source§

impl UIFocusItemContainer for UIActivityIndicatorView

Available on crate feature UIActivityIndicatorView only.
Source§

impl UIFocusItemContainer for UIAlertView

Available on crate feature UIAlertView only.
Source§

impl UIFocusItemContainer for UIBackgroundExtensionView

Available on crate feature UIBackgroundExtensionView only.
Source§

impl UIFocusItemContainer for UIButton

Available on crate feature UIButton only.
Source§

impl UIFocusItemContainer for UICalendarView

Available on crate feature UICalendarView only.
Source§

impl UIFocusItemContainer for UICollectionReusableView

Available on crate feature UICollectionViewCell only.
Source§

impl UIFocusItemContainer for UICollectionView

Available on crate feature UICollectionView only.
Source§

impl UIFocusItemContainer for UICollectionViewCell

Available on crate feature UICollectionViewCell only.
Source§

impl UIFocusItemContainer for UICollectionViewListCell

Available on crate feature UICollectionViewListCell only.
Source§

impl UIFocusItemContainer for UIColorWell

Available on crate feature UIColorWell only.
Source§

impl UIFocusItemContainer for UIContentUnavailableView

Available on crate feature UIContentUnavailableView only.
Source§

impl UIFocusItemContainer for UIControl

Available on crate feature UIControl only.
Source§

impl UIFocusItemContainer for UIDatePicker

Available on crate feature UIDatePicker only.
Source§

impl UIFocusItemContainer for UIEventAttributionView

Available on crate feature UIEventAttributionView only.
Source§

impl UIFocusItemContainer for UIImageView

Available on crate feature UIImageView only.
Source§

impl UIFocusItemContainer for UIInputView

Available on crate feature UIInputView only.
Source§

impl UIFocusItemContainer for UILabel

Available on crate feature UILabel only.
Source§

impl UIFocusItemContainer for UIListContentView

Available on crate feature UIListContentConfiguration only.
Source§

impl UIFocusItemContainer for UINavigationBar

Available on crate feature UINavigationBar only.
Source§

impl UIFocusItemContainer for UIPageControl

Available on crate feature UIPageControl only.
Source§

impl UIFocusItemContainer for UIPasteControl

Available on crate feature UIPasteControl only.
Source§

impl UIFocusItemContainer for UIPickerView

Available on crate feature UIPickerView only.
Source§

impl UIFocusItemContainer for UIPopoverBackgroundView

Available on crate feature UIPopoverBackgroundView only.
Source§

impl UIFocusItemContainer for UIProgressView

Available on crate feature UIProgressView only.
Source§

impl UIFocusItemContainer for UIRefreshControl

Available on crate feature UIRefreshControl only.
Source§

impl UIFocusItemContainer for UIScrollView

Available on crate feature UIScrollView only.
Source§

impl UIFocusItemContainer for UISearchBar

Available on crate feature UISearchBar only.
Source§

impl UIFocusItemContainer for UISearchTextField

Available on crate feature UISearchTextField only.
Source§

impl UIFocusItemContainer for UISegmentedControl

Available on crate feature UISegmentedControl only.
Source§

impl UIFocusItemContainer for UISlider

Available on crate feature UISlider only.
Source§

impl UIFocusItemContainer for UIStackView

Available on crate feature UIStackView only.
Source§

impl UIFocusItemContainer for UIStandardTextCursorView

Available on crate feature UIStandardTextCursorView only.
Source§

impl UIFocusItemContainer for UIStepper

Available on crate feature UIStepper only.
Source§

impl UIFocusItemContainer for UISwitch

Available on crate feature UISwitch only.
Source§

impl UIFocusItemContainer for UITabBar

Available on crate feature UITabBar only.
Source§

impl UIFocusItemContainer for UITableView

Available on crate feature UITableView only.
Source§

impl UIFocusItemContainer for UITableViewCell

Available on crate feature UITableViewCell only.
Source§

impl UIFocusItemContainer for UITableViewHeaderFooterView

Available on crate feature UITableViewHeaderFooterView only.
Source§

impl UIFocusItemContainer for UITextField

Available on crate feature UITextField only.
Source§

impl UIFocusItemContainer for UITextView

Available on crate feature UITextView only.
Source§

impl UIFocusItemContainer for UIToolbar

Available on crate feature UIToolbar only.
Source§

impl UIFocusItemContainer for UIView

Available on crate feature UIView only.
Source§

impl UIFocusItemContainer for UIVisualEffectView

Available on crate feature UIVisualEffectView only.
Source§

impl UIFocusItemContainer for UIWebView

Available on crate feature UIWebView only.
Source§

impl UIFocusItemContainer for UIWindow

Available on crate feature UIWindow only.