Package apple.uikit.protocol
Interface UIFocusItemContainer
-
- All Known Subinterfaces:
UIFocusItemScrollableContainer
- 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,SCNView,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 UIFocusItemContainerObjects conforming to UIFocusItemContainer are responsible for providing which focus items they contain and where they are. API-Since: 12.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull UICoordinateSpacecoordinateSpace()The coordinate space of the focus items contained in this container.@NotNull NSArray<?>focusItemsInRect(CGRect rect)Returns an array of all focus items within this container that intersect with the provided rect.
-
-
-
Method Detail
-
coordinateSpace
@NotNull @NotNull UICoordinateSpace coordinateSpace()
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.
-
focusItemsInRect
@NotNull @NotNull NSArray<?> focusItemsInRect(CGRect rect)
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.
-
-