How do I properly handle touch events in iOS?

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
yeahtuna
Posts: 19
Joined: Tue Jun 21, 2016 10:41 pm

How do I properly handle touch events in iOS?

Postby yeahtuna » Sat Mar 10, 2018 2:30 pm

Hi all,

Are there any iOS experts with a tip to share?

I develop a Windows/macOS/iOS application and the UI for my app is built on VSTGUI 4.3.

I'm having troubles handling a "close" button for a dialog box in iOS. The idea is to remove a CViewContainer when the user clicks (touches) "close". The "close" button is a child of the container.

In valueChanged(), I set a flag to remove the container in the next idle() call. This works as expected in Windows and macOS. In iOS, however, it seems that additional touch events are still being triggered after the container has been "forgotten". This of course leads to a crash.

Is there a way to prevent these additional events from being triggered? How should I be handling the events for a close button?

Thank-you in advance for any advice you can offer.

Regards,
Rob.

Arne Scheffler
Posts: 201
Joined: Mon Jun 20, 2016 7:53 am

Re: How do I properly handle touch events in iOS?

Postby Arne Scheffler » Tue Mar 13, 2018 11:17 am

Hi Rob,
a callstack with the crash would help to see where the problem may be.

Cheers
Arne


Return to “VSTGUI”

Who is online

Users browsing this forum: No registered users and 1 guest