Looking for ios Answers? Try Ask4KnowledgeBase
Looking for ios Keywords? Try Ask4Keywords

iOS Accessibility Frame


Example

The accessibility frame is used by VoiceOver for hit testing touches, drawing the VoiceOver cursor, and calculating where in the focused element to simulate a tap when the user double-taps the screen. Note that the frame is in screen coordinates!

myElement.accessibilityFrame = frameInScreenCoordinates;

If your elements or screen layouts change often, consider overriding -accessibilityFrame to always provide an up-to-date rect. Calculating the screen-relative frame of scroll view subviews can be error-prone and tedious. iOS 10 introduces a new API to make this easier: accessibilityFrameInContainerSpace.