views:

22

answers:

1

Im using NSThead and have a loading screen whilst im downloading images form the web to display, whist this is happening, could i stop the UI touch being registered? I have buttons on that view and when the loading screen is up, its basicllya text label which has a slightly transparent background. but if someone clicks on it, it registers the back ground buttons being clicked so i want to avoid that.

+1  A: 

I recommend to use a UIAlertView for this. Override the buttons and provide your own "HideIt" handler wich finally call Dismiss...

UIAlterView is somehow a UIView so you can change it's look. And it blocks the underlying UI without any extra code.

Also possible - Create a (somehow transparent) UIView which covers your View. You can place a text and / or a UIActivity... on it to show a loading animation. When loading starts show this thing - when done hide id.

If you want to update this view (Progress indicator / text) be sure to run the updates on the MainThread.

Manfred

ManniAT
I second Manni's idea about creating a UIView that overlays your view so that your taps don't pass through to the view underneath. Also, see this post: http://stackoverflow.com/questions/3113680/how-to-block-ui-in-iphone
iWasRobbed
THanks, I done it this way now. Created a 2nd UIView and just hide/display that