views:

224

answers:

1

I have a button which should not be clicked by user, when some processing is going on [shown using UIActivityIndicatorView].

For this when the processing starts i call [[UIApplication sharedapplication] beginIgnoringInteractionEvents];

and when processing ends i call [[UIApplication sharedApplication] endIgnoringInteractionEvents];

If i click the button during processing, touch event does not get called, but it gets called as soon as the processing stops.

Why is this happening?

+2  A: 

try disabling the button instead.

[self.yourbutton setEnabled:FALSE];

Andiih
Thanks for the reply. But even that does not work.
AGK
Humm- you are right. A button that has been enabled at some time does appear to queue touches, but one that has never been enabled does not. This may be the behavior Apple desired as it allows the user to pre-empty an interface option becoming available, a bit like the type ahead action of a keyboard buffer
Andiih