Hello!
I am working on an application with a chat feature. The chat is implemented using a UICollectionView
. The content in our chat grows from the bottom and upwards, as is standard (like for instance the Messages app), with the most recent item being shown at the bottom.
We have implemented this using a "hack", flipping the collection view upside-down by using a transform, and flipping the content views of the cells upside down again. This works nicely; the only remaining problem is ensuring that elements are read in the correct order for users with VoiceOver enabled.
Standard behaviour with VoiceOver enabled for collection views is that swiping right moves focus to the next element, while swiping left moves focus to the previous element. Despite the collectionView being inverted (upside-down) swiping right with VoiceOver enabled moves focus to the element above, while swiping left moves focus to the element below. Is there any way to invert this behaviour?
I have looked at subclassing the collection view and overriding accessibilityIncrement
and accessibilityDecrement
, but it did not have any effect. It seems the standard collection view accessibility container implementation does not call these methods.