I implement the Accessibility delegate methods inside a UIViewController subclass and I put a breakpoint in these delegate methods, but it never hits the breakpoint. What is the reason for this? Please let me know if anyone has an idea about this.
Asked
Active
Viewed 1,342 times
1 Answers
1
Methods in the UIAccessibility
protocol are intended to describe accessible, on-screen elements, not logical blocks of code or whole screens. Accessibility clients will query your user interface for descriptions, so you will want to implement the protocol on UIView
subclasses.
Please consider browsing the Accessibility Programming Guide for iOS for an introduction to the accessibility APIs on iOS.

Justin
- 20,509
- 6
- 47
- 58
-
when what I did didn't work, I tried to create a subclass of a UICollectionView and the placed a breakpoint in one of the accessibility delegate methods, it never hit that either..I am writing these in swift, I don't know if writing in swift makes any difference. – Shabarinath Pabba Jul 30 '15 at 22:21
-
There is no difference with Swift. As a container for other views, `UICollectionView` is treated differently by VoiceOver and other accessibility clients. To experiment, add a bare `UIView` to your app window and override its description. Now turn on VoiceOver and select it. – Justin Jul 31 '15 at 03:24