A fully accessible custom UIControl
, as demoed at the September 11, 2014, CopenhagenCocoa event:
The code illustrates what it took to be a fairly good UIControl
at the time (probably not too far from what it takes today), but was written with the demo in mind. It is therefore not production quality, but may serve as inspiration to some.
This is how it looks in action:
The tags mark various key points in the demo (deltas):
- A basic starting point:
1-start
- Add infinite scrolling:
2-infinite-scrolling
- Add Debug button and category:
3-debug
- Add support for target/action pattern:
4-target-action
- Support KVO:
5-kvo
- Add Accessibility support:
6-accessibility
- Add custom localized Accessibility properties:
7-accessibility-values
- Make round Accessibility path:
8-accessibility-path