Page 1 of 1

How do I properly handle touch events in iOS?

Posted: Sat Mar 10, 2018 2:30 pm
by yeahtuna
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.

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

Posted: Tue Mar 13, 2018 11:17 am
by Arne Scheffler
Hi Rob,
a callstack with the crash would help to see where the problem may be.

Cheers
Arne