Shay
Shay

Reputation: 2605

Is there a way to disable touches to my iphone app for a while?

Is there a way to disable touches to my iphone app for a while?

What is the way i should do it?

Tnx

Upvotes: 0

Views: 72

Answers (2)

Mats Stijlaart
Mats Stijlaart

Reputation: 5098

I'm not sure why you wan't to do this, because it is not user friendly.

When your app is loading something, make a view which you lay over your window. Make it gray and give it an alpha of .4 this way your screen 'looks' disabled. You can add a spinner as extra 'loading' indication.

When you want to preform tasks at startup. Just add a startup screen.

When your task(s) is/are finished, remove the screens you do not need.

Upvotes: 0

Eimantas
Eimantas

Reputation: 49354

Try this:

[[UIApplication sharedInstance] beginIgnoringInteractionEvents];

and when you want to enable them again, call this:

[[UIApplication sharedInstance] endIgnoringInteractionEvents];

Upvotes: 3

Related Questions