UIFocusItem

Trait UIFocusItem 

Source
pub unsafe trait UIFocusItem: UIFocusEnvironment + MainThreadOnly {
    // Provided methods
    unsafe fn canBecomeFocused(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn frame(&self) -> CGRect
       where Self: Sized + Message { ... }
    unsafe fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
       where Self: Sized + Message { ... }
    unsafe fn focusGroupPriority(&self) -> UIFocusGroupPriority
       where Self: Sized + Message { ... }
    unsafe fn focusItemDeferralMode(&self) -> UIFocusItemDeferralMode
       where Self: Sized + Message { ... }
    unsafe fn isTransparentFocusItem(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn didHintFocusMovement(&self, hint: &UIFocusMovementHint)
       where Self: Sized + Message { ... }
}
Available on crate feature UIFocus only.
Expand description

Objects conforming to UIFocusItem are considered capable of participating in focus. Only UIFocusItems can ever be focused.

See also Apple’s documentation

Provided Methods§

Source

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

Indicates whether or not this item is currently allowed to become focused. Returning NO restricts the item from being focusable, even if it is visible in the user interface. For example, UIControls return NO if they are disabled.

Source

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

Available on crate feature objc2-core-foundation only.

The geometric frame of this item, represented in the coordinateSpace of the UIFocusItemContainer in which it is contained.

Source

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

Available on crate feature UIFocusEffect only.

Describes a visual effect to apply when this item is focused. When not implemented, the system may create a default effect for this item. Returning nil indicates that the system should not apply any visual effects, and that the app will handle applying the appropriate visuals.

Source

unsafe fn focusGroupPriority(&self) -> UIFocusGroupPriority
where Self: Sized + Message,

The priority this item has in its focus group. The higher the priority, the more likely it is to get picked when focus moves into this group. Note: this method can only be used to increase an item’s priority, not decrease it. For example if an item is currently selected, the actual priority of this item will be determined by MAX(focusGroupPriority, UIFocusGroupPrioritySelected).

Source

unsafe fn focusItemDeferralMode(&self) -> UIFocusItemDeferralMode
where Self: Sized + Message,

If this property is present and returns UIFocusItemDeferralModeNever, the focus deferral will not be enabled again after the user engagement timeout has expired if this item is currently focused and programmatic focus updates pointing to this item will be executed immediatly. If it returns UIFocusItemDeferralModeAlways focus will always be deferred when this item is supposed to be focused. Does nothing when focus deferral is not supported on the platform.

Source

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

If this returns YES, the focus item is considered transparent in terms of occlusion. Items that are behind it are focusable. This value is ignored when the item is focusable, in which case the item is never considered transparent.

Source

unsafe fn didHintFocusMovement(&self, hint: &UIFocusMovementHint)
where Self: Sized + Message,

Available on crate feature UIFocusMovementHint only.

Called whenever this focus item is hinting to the user a focus movement might occur. The provided object is mutated by the focus engine whenever the user’s finger moves.

Trait Implementations§

Source§

impl ProtocolType for dyn UIFocusItem

Source§

const NAME: &'static str = "UIFocusItem"

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 UIFocusItem
where T: ?Sized + Message + UIFocusItem,

Implementations on Foreign Types§

Source§

impl<T> UIFocusItem for ProtocolObject<T>
where T: ?Sized + UIFocusItem,

Implementors§

Source§

impl UIFocusItem for UIActionSheet

Available on crate feature UIActionSheet only.
Source§

impl UIFocusItem for UIActivityIndicatorView

Available on crate feature UIActivityIndicatorView only.
Source§

impl UIFocusItem for UIAlertView

Available on crate feature UIAlertView only.
Source§

impl UIFocusItem for UIButton

Available on crate feature UIButton only.
Source§

impl UIFocusItem for UICalendarView

Available on crate feature UICalendarView only.
Source§

impl UIFocusItem for UICollectionReusableView

Available on crate feature UICollectionViewCell only.
Source§

impl UIFocusItem for UICollectionView

Available on crate feature UICollectionView only.
Source§

impl UIFocusItem for UICollectionViewCell

Available on crate feature UICollectionViewCell only.
Source§

impl UIFocusItem for UICollectionViewListCell

Available on crate feature UICollectionViewListCell only.
Source§

impl UIFocusItem for UIColorWell

Available on crate feature UIColorWell only.
Source§

impl UIFocusItem for UIContentUnavailableView

Available on crate feature UIContentUnavailableView only.
Source§

impl UIFocusItem for UIControl

Available on crate feature UIControl only.
Source§

impl UIFocusItem for UIDatePicker

Available on crate feature UIDatePicker only.
Source§

impl UIFocusItem for UIEventAttributionView

Available on crate feature UIEventAttributionView only.
Source§

impl UIFocusItem for UIImageView

Available on crate feature UIImageView only.
Source§

impl UIFocusItem for UIInputView

Available on crate feature UIInputView only.
Source§

impl UIFocusItem for UILabel

Available on crate feature UILabel only.
Source§

impl UIFocusItem for UIListContentView

Available on crate feature UIListContentConfiguration only.
Source§

impl UIFocusItem for UINavigationBar

Available on crate feature UINavigationBar only.
Source§

impl UIFocusItem for UIPageControl

Available on crate feature UIPageControl only.
Source§

impl UIFocusItem for UIPasteControl

Available on crate feature UIPasteControl only.
Source§

impl UIFocusItem for UIPickerView

Available on crate feature UIPickerView only.
Source§

impl UIFocusItem for UIPopoverBackgroundView

Available on crate feature UIPopoverBackgroundView only.
Source§

impl UIFocusItem for UIProgressView

Available on crate feature UIProgressView only.
Source§

impl UIFocusItem for UIRefreshControl

Available on crate feature UIRefreshControl only.
Source§

impl UIFocusItem for UIScrollView

Available on crate feature UIScrollView only.
Source§

impl UIFocusItem for UISearchBar

Available on crate feature UISearchBar only.
Source§

impl UIFocusItem for UISearchTextField

Available on crate feature UISearchTextField only.
Source§

impl UIFocusItem for UISegmentedControl

Available on crate feature UISegmentedControl only.
Source§

impl UIFocusItem for UISlider

Available on crate feature UISlider only.
Source§

impl UIFocusItem for UIStackView

Available on crate feature UIStackView only.
Source§

impl UIFocusItem for UIStandardTextCursorView

Available on crate feature UIStandardTextCursorView only.
Source§

impl UIFocusItem for UIStepper

Available on crate feature UIStepper only.
Source§

impl UIFocusItem for UISwitch

Available on crate feature UISwitch only.
Source§

impl UIFocusItem for UITabBar

Available on crate feature UITabBar only.
Source§

impl UIFocusItem for UITableView

Available on crate feature UITableView only.
Source§

impl UIFocusItem for UITableViewCell

Available on crate feature UITableViewCell only.
Source§

impl UIFocusItem for UITableViewHeaderFooterView

Available on crate feature UITableViewHeaderFooterView only.
Source§

impl UIFocusItem for UITextField

Available on crate feature UITextField only.
Source§

impl UIFocusItem for UITextView

Available on crate feature UITextView only.
Source§

impl UIFocusItem for UIToolbar

Available on crate feature UIToolbar only.
Source§

impl UIFocusItem for UIView

Available on crate feature UIView only.
Source§

impl UIFocusItem for UIVisualEffectView

Available on crate feature UIVisualEffectView only.
Source§

impl UIFocusItem for UIWebView

Available on crate feature UIWebView only.
Source§

impl UIFocusItem for UIWindow

Available on crate feature UIWindow only.