How do I properly handle touch events in iOS?

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.

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

Cheers
Arne