AGK
AGK

Reputation: 11

Disable touch events while processing

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?

Upvotes: 1

Views: 1367

Answers (1)

Andiih
Andiih

Reputation: 12413

try disabling the button instead.

[self.yourbutton setEnabled:FALSE];

Upvotes: 2

Related Questions