Re: Custom view has a wrong accessibilityFrame at startup
Re: Custom view has a wrong accessibilityFrame at startup
- Subject: Re: Custom view has a wrong accessibilityFrame at startup
- From: Fritz Anderson <email@hidden>
- Date: Thu, 01 Dec 2011 13:19:50 -0600
I forgot: iOS 5.0 SDK, targeting 4.3 iPad, running on the 4.3 simulator, Xcode 4.2.
— F
On 1 Dec 2011, at 1:15 PM, Fritz Anderson wrote:
> 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?
_______________________________________________
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