开发者

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开发者_JS百科 background. but if someone clicks on it, it registers the back ground buttons being clicked so i want to avoid that.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜