Created
March 17, 2013 18:29
-
-
Save inailuy/5182946 to your computer and use it in GitHub Desktop.
properly show SVProgressHUD when resigning keyboard
This file contains 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
// resign keyboard | |
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.3 * NSEC_PER_SEC), dispatch_get_current_queue(), ^{ | |
[SVProgressHUD showWithStatus:@"Searching..." maskType:SVProgressHUDMaskTypeBlack]; | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ | |
//do search | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
//search finished - do smth with search results and hide hud | |
[SVProgressHUD dismiss]; | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment