Custom view has a wrong accessibilityFrame at startup
Custom view has a wrong accessibilityFrame at startup
- Subject: Custom view has a wrong accessibilityFrame at startup
- From: Fritz Anderson <email@hidden>
- Date: Thu, 01 Dec 2011 13:15:08 -0600
I have a custom UIView. It represents a timeline, which is divided into segments. What I would like to happen is that tapping a segment should select it, and speak its place and time in the timeline.
Accessibility-element layout is done in my -updateAccessibilityElements method. It bases the segment frames on the view's accessibilityFrame.
The first time my -updateAccessibilityElements is called (and I call it repeatedly at startup), I log this for the view accessibility frame (note origin.y):
-[AudioSegmentView updateAccessibilityElements]: view accessibility frame = {{26, 473}, {716, 20}}
This is 20 points too low, and the view does not permit selection. On subsequent calls, after the view redoes its layout because user interaction changed the contents, the view frame is reported correctly:
-[AudioSegmentView updateAccessibilityElements]: view accessibility frame = {{26, 453}, {716, 20}}
Between the early and later calls, the view does not appear to move, and it draws correctly every time.
What's the trick?
— F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden