views:

53

answers:

1

Is there a way to tell the system to cancel all touch event sequences that are currently happening in your app?

In one part of my app, I show a new view when a user selects a particular table cell. But, I want to make sure they aren't simultaneously touching any other buttons. For example, if they are holding a toolbar button while they select the table cell, I want to cancel that touch on the toolbar button.

A UIActionSheet will do this type of touch-canceling when it is shown, and that's exactly what I want to do.

I tried setting exclusiveTouch on the UIToolbar, but that didn't seem to help. And, the toolbar button is a UIBarButtonItem, so it doesn't have an exclusiveTouch property itself. Is there somewhere else I should set that property that might help?

A: 

Set exclusiveTouch on the views that require exclusivity; this is probably the table cell instead of the buttons.

While you can't set exclusiveTouch directly on UIBarButtonItems, you can set it on the toolbar's subviews (ick).

tc.