找不到<uinavigationbutton ... in =“”a =“”list =“”of =“”sorted =“”view =“”with =“”voiceover =“”on =“”

时间:2015-07-14 18:55:09

标签: ios voiceover

=“”

我们有一个带菜单的应用。有一个UIBarButton可以点击打开它。顶视图滑开以显示菜单。当VoiceOver打开时,我们会收到以下错误。我假设因为

的区域
2015-07-14 14:29:11.772 xxxxx[318:36506] |error| Could not find <UINavigationButton: 0x13e57db60; frame = (5 6; 40 30); opaque = NO; layer = <CALayer: 0x170435ee0>> in a list of sorted view [parent: <MobileUIApplication: 0x13e6023d0>] siblings (
    "<UITableView: 0x13e8ac800; frame = (0 20; 375 647); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; autoresizesSubviews = NO; gestureRecognizers = <NSArray: 0x17444cb10>; layer = <CALayer: 0x170436560>; contentOffset: {0, 0}; contentSize: {375, 680}>"
).  If this happened right around a screen change, it might be okay, but otherwise this is probably a bug.
2015-07-14 14:29:11.775 xxxxx[318:36506] |error| Could not find <UINavigationButton: 0x13e57db60; frame = (5 6; 40 30); opaque = NO; layer = <CALayer: 0x170435ee0>> in a list of sorted view [parent: <MobileUIApplication: 0x13e6023d0>] siblings (
    "<UITableView: 0x13e8ac800; frame = (0 20; 375 647); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; autoresizesSubviews = NO; gestureRecognizers = <NSArray: 0x17444cb10>; layer = <CALayer: 0x170436560>; contentOffset: {0, 0}; contentSize: {375, 680}>"
).  If this happened right around a screen change, it might be okay, but otherwise this is probably a bug.

我添加了UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification,nil);但我仍然得到错误。

我应该关注这个问题吗?

1 个答案:

答案 0 :(得分:1)

您正在使用UIAccessibilityLayoutChangedNotification,用于通知UIView的元素或部分内容的布局已更改。尝试使用UIAccessibilityScreenChangedNotification

如果你的tableView滚动,你可能想要使用UIAccessibilityPostNotification(UIAccessibilityPageScrolledNotification, [self.tableView indexPathsForVisibleRows]);,这样每次tableView滚动时,焦点都在tableView的第一个单元格上。