开发者

Disable all buttons until finished loading?

I have a app where people can delete stuff. I am wanting to disable all my buttons so the user has to wait till the act开发者_运维问答ion is done.

I have the setHidesBackButton working, but it looks tacky. I would rather have it just become inactive where if the user taps it, they can't go anywhere.

I have looked into a few things, and wonder what's the best option! (like to replace it with another button).

Please post some code with your answer :)

Thanks in advance,

Coulton


Here's what I did: when it was loading, I set the user interaction like this:

self.view.userInteractionEnabled = NO;

Then when it was done, I did this:

self.view.userInteractionEnabled = YES;

Hope I helped some people.


One approach is to put a modal view with user interaction disabled over the whole screen. The view can use transparency to 'dim' the screen and you could add a UIActivityView to this view so the user knows they need to wait for a moment.

If you just want to make the buttons inactive, I've done this before with a transparent view, again set to have user interaction disabled, positioned over the navigation bar.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜