Created
October 6, 2009 11:56
-
-
Save b00gizm/202946 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create your SFHFHudView object (maybe inside of viewDidLoad:) | |
HUD = [[SFHFHUDView alloc] initWithFrame:[[UIApplication sharedApplication].keyWindow bounds]]; | |
// Show your HUD | |
// remember: SFHFHudView is subclass of UIView, not UIView | |
[HUD setStatusText:@"Doing stuff ..."]; | |
[HUD setShowsStatusLabel:YES]; | |
[HUD startActivityIndicator]; | |
[HUD makeKeyAndVisible]; | |
// Hide your HUD | |
[HUD stopActivityIndicator]; | |
[HUD resignKeyWindow]; | |
[HUD setHidden:YES]; | |
// Don't forget to make your "normal" window the key window again. | |
// Otherwise you'll have trouble showing the HUD again | |
[[[[UIApplication sharedApplication] delegate] window] makeKeyWindow]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment