user370507
user370507

Reputation: 497

Blocking UI Interation whilst image is downloading

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.

Upvotes: 1

Views: 208

Answers (1)

ManniAT
ManniAT

Reputation: 2029

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

Upvotes: 1

Related Questions