Saturday, November 8, 2025
HomeiOS Developmentios - How one can navigate with UIAccessibility solely into seen cells...

ios – How one can navigate with UIAccessibility solely into seen cells of aUICollectionView

[ad_1]

I am making an attempt to navigate right into a UICollectionView (from both course, ahead or again) utilizing UIAccessibility, however the default habits is to leap to both the primary or final cell (relying on navigation course), whatever the cell visibility on display screen.
The issue with this habits is that when navigating previous the gathering view to a web page management after which again after altering the web page, as an alternative of specializing in the final seen merchandise, it scrolls the gathering view to the final web page, final component.

At present the cells have isAccessibilityElement = true. I attempted dynamically returning true just for these cells which can be on the at present seen web page, that did not work.

Setting remembersLastFocusedIndexPath = true on the gathering view did not do a lot with accessibility (as anticipated, provided that the precise assortment view is not accessible, the person cells are).

I additionally tried to manually set the accessibilityElements array to solely these on the present web page by retrieving the seen gadgets after a web page change. It did not appear work and “confused” accessibility (i.e. navigation broke in lots of sudden methods).

This was beforehand requested another way right here: How one can make VoiceOver ignore UICollectionViewCell that aren’t seen –barely totally different from what I am asking, however in the end it’s the identical downside.
Any concepts can be appreciated.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments