voice over can only see a page of a uicollectionview

前端 未结 4 417
忘了有多久
忘了有多久 2020-12-13 21:26

So i have a UICollectionView with a set of UICollectionViewCells displayed using a custom UILayout.

I\'ve configured the UILayout to lay out all the UICollectionView

4条回答
  •  死守一世寂寞
    2020-12-13 22:01

    Stephen's answer worked for me! Thanks.

    I want to add that this seems to affect only iOS6; it looks like they fixed it in iOS7.

    Also, you can make the scrolling slightly faster and cleaner by passing self instead of nil to UIAccessibilityPostNotification -- like so:

    - (void)accessibilityElementDidBecomeFocused {    
        UICollectionView *collectionView = (UICollectionView *)self.superview;
        [collectionView scrollToItemAtIndexPath:[collectionView indexPathForCell:self] atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally|UICollectionViewScrollPositionCenteredVertically animated:NO];
        UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, self);
    }
    

提交回复
热议问题