Re: Help debugging a weird issue in my magic tap implementation
Re: Help debugging a weird issue in my magic tap implementation
- Subject: Re: Help debugging a weird issue in my magic tap implementation
- From: Vincenzo Rubano <email@hidden>
- Date: Mon, 16 Apr 2018 23:33:33 +0200
Hi Chris,
> Il giorno 16 apr 2018, alle ore 16:37, Chris Fleizach <email@hidden>
> ha scritto:
> It sounds like the view controller for the views in the toolbar do not link
> up with the navigation controller.
>
Vincenzo:
I see what you mean, but I cannot see the reason why. The view controller is
the root view controller of the navigation controller and there isn’t any other
VC on top of it. The relationship is established through a standard storyboard
segue. Is this perhaps something broken in the accessibility APIs? I know I
shouldn’t ask but well… Since AVPlayerViewController does the same thing I want
to do but without issues, does it mean that it does not use UIToolbar and
UIBarButtonItem instances in order to display the playback controls?
Chris:
> Maybe the easiest thing to do is to duplicate the functionality for the
> UIToolbar or toolbar controller
>
Vincenzo:
If you mean putting a UIToolbar in the view hierarchy, constraining it to the
bottom of the screen and managing the items from there I’ve already tried that
root and I have exactly the same issues. The problem is that I need to use
UIBarButtonItems so that I can take advantage of the standard system playback
controls.
>> On Apr 16, 2018, at 7:24 AM, Vincenzo Rubano <email@hidden>
>> wrote:
>>
>> Hi all,
>>
>> background: in my app, I want to perform a certain task when a VoiceOver
>> user performs the magic tap gesture. The accessibilityPerformMagicTap() is
>> implemented in a view controller that is embedded inside a
>> UINavigationController. In the implementation of the method I want to
>> control the playback of an AVPlayer. This results into an item of the
>> UIToolbar managed by the view controller changing depending on the fact that
>> the playback has been paused or resumed. The toolbar items are displayed by
>> populating the toolbarItems array of the viewController, thus populating the
>> toolbar of the UINavigationController. So far so good, or at least I hope so.
>>
>> Issue: Now the fun part begins. If I place the VoiceOver focus on any
>> element of the VC other than the ones in the toolbar the magic tap works as
>> expected. On the other hand, if the focus is placed on one of the toolbar
>> items the accessibilityPerformMagicTap() method in my VC is never called and
>> the gesture is handled by the system. Do you have any hints on how I could
>> understand what’s going wrong?
>>
>> I’ve already tried posting UIAccessibilityScreenChangedNotification or
>> UIAccessibilityLayoutChangedNotification after replacing the toolbar item,
>> but it didn’t solve the issue. The app is written in Swift 4.1 and linked
>> against the iOS 11.3 SDK. The toolbar items are adjusted by invoking the
>> setToolbarItems(_, animated:) method provided by UIViewController.
>>
>> Thanks in advance for your support
>>
>>
>> Vincenzo
>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Accessibility-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden