Illep
Illep

Reputation: 16841

UIActivityIndicator like MBProgressHud

I am using MBProgressHUD to show animations when the view is loading. WHen the animation is loading, the user is unable to click at any object in the background (button, label,textfield etc), the screen is simply locked.

I have seen in Foursquare, that they had used a MBProgressHUD like animation, and users could still on objects in the background (we are capable to clicking on buttons, Labels, Textfields etc).

I need to implement this is in my application as well. Is there a library that i could use ?

note: The library should not be using any private APIs.

Upvotes: 1

Views: 919

Answers (1)

tim
tim

Reputation: 1682

SVProgressHUD is a great alternative to MBProgressHUD and lets you decide if you want to block user input or not:

+ (void)showWithMaskType:(SVProgressHUDMaskType)maskType;

SVProgressHUDMaskType:

enum {
    SVProgressHUDMaskTypeNone = 1, // allow user interactions, don't dim background UI (default)
    SVProgressHUDMaskTypeClear, // disable user interactions, don't dim background UI
    SVProgressHUDMaskTypeBlack, // disable user interactions, dim background UI with 50% translucent black
    SVProgressHUDMaskTypeGradient // disable user interactions, dim background UI with translucent radial gradient (a-la-alertView)
};

Upvotes: 4

Related Questions