Package apple.uikit.protocol
Interface UIFocusItem
-
- All Superinterfaces:
UIFocusEnvironment
- All Known Implementing Classes:
ARCoachingOverlayView,ARSCNView,ARSKView,ASAuthorizationAppleIDButton,AVRoutePickerView,BCChatButton,CAInterAppAudioSwitcherView,CAInterAppAudioTransportView,CLLocationButton,CPWindow,GLKView,HKActivityRingView,HMCameraView,INUIAddVoiceShortcutButton,LPLinkView,MKAnnotationView,MKCircleView,MKCompassButton,MKMapView,MKMarkerAnnotationView,MKOverlayPathView,MKOverlayView,MKPinAnnotationView,MKPolygonView,MKPolylineView,MKScaleView,MKUserLocationView,MKUserTrackingButton,MPVolumeView,MSStickerBrowserView,MSStickerView,MTKView,PDFThumbnailView,PDFView,PHLivePhotoView,PKAddPassButton,PKCanvasView,PKIdentityButton,PKPayLaterView,PKPaymentButton,RPSystemBroadcastPickerView,SCNNode,SCNReferenceNode,SCNView,SK3DNode,SKAudioNode,SKCameraNode,SKCropNode,SKEffectNode,SKEmitterNode,SKFieldNode,SKLabelNode,SKLightNode,SKNode,SKReferenceNode,SKScene,SKShapeNode,SKSpriteNode,SKTileMapNode,SKTransformNode,SKVideoNode,SKView,SWAttributionView,SWCollaborationView,UIActionSheet,UIActivityIndicatorView,UIAlertView,UIButton,UICalendarView,UICollectionReusableView,UICollectionView,UICollectionViewCell,UICollectionViewListCell,UIColorWell,UIContentUnavailableView,UIControl,UIDatePicker,UIEventAttributionView,UIImageView,UIInputView,UILabel,UIListContentView,UINavigationBar,UIPageControl,UIPasteControl,UIPickerView,UIPopoverBackgroundView,UIProgressView,UIRefreshControl,UIScrollView,UISearchBar,UISearchTextField,UISegmentedControl,UISlider,UIStackView,UIStepper,UISwitch,UITabBar,UITableView,UITableViewCell,UITableViewHeaderFooterView,UITextField,UITextView,UIToolbar,UIView,UIVisualEffectView,UIWebView,UIWindow,WKWebView
public interface UIFocusItem extends UIFocusEnvironment
Objects conforming to UIFocusItem are considered capable of participating in focus. Only UIFocusItems can ever be focused. API-Since: 10.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancanBecomeFocused()Indicates whether or not this item is currently allowed to become focused.default voiddidHintFocusMovement(@NotNull UIFocusMovementHint hint)Called whenever this focus item is hinting to the user a focus movement might occur.default @Nullable UIFocusEffectfocusEffect()Describes a visual effect to apply when this item is focused.default longfocusGroupPriority()The priority this item has in its focus group.CGRectframe()The geometric frame of this item, represented in the `coordinateSpace` of the UIFocusItemContainer in which it is contained.default booleanisTransparentFocusItem()If this returns YES, the focus item is considered transparent in terms of occlusion.-
Methods inherited from interface apple.uikit.protocol.UIFocusEnvironment
didUpdateFocusInContextWithAnimationCoordinator, focusGroupIdentifier, focusItemContainer, parentFocusEnvironment, preferredFocusedView, preferredFocusEnvironments, setNeedsFocusUpdate, shouldUpdateFocusInContext, updateFocusIfNeeded
-
-
-
-
Method Detail
-
canBecomeFocused
boolean canBecomeFocused()
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.
-
didHintFocusMovement
default void didHintFocusMovement(@NotNull @NotNull UIFocusMovementHint hint)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. API-Since: 12.0
-
frame
CGRect frame()
The geometric frame of this item, represented in the `coordinateSpace` of the UIFocusItemContainer in which it is contained. API-Since: 12.0
-
focusEffect
@Nullable default @Nullable UIFocusEffect focusEffect()
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. API-Since: 15.0
-
focusGroupPriority
default long focusGroupPriority()
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). API-Since: 15.0
-
isTransparentFocusItem
default boolean isTransparentFocusItem()
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. API-Since: 15.0
-
-