The first element of iOS VoiceOver

I am currently having problems setting the focus of VoiceOver to a specific shortcut. According to the Apple developers site ( https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/Accessibility/AccessibilityfromtheViewControllersPerspective.html ), you can change the focus of the first object by adding the following code fragment:

@implementation MyViewController
- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification,
                                self.myFirstElement);
}
@end

Unfortunately, I could not get this to work properly in iOS7.

Change To clarify what I meant by not working properly, it was that the default is for the top left button of the panel in the navigation bar. I can verify that the shortcut I'm trying to focus on is not zero, and is a subheading of another view, which I use instead of the navbar title.

+4
1

. , , , - . , , , , . , , . , - 0,75 .

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.75 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
    UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self.myFirstElement);
});
+3

Source: https://habr.com/ru/post/1529609/


All Articles