Created
July 18, 2011 17:10
-
-
Save agoodman/1090073 to your computer and use it in GitHub Desktop.
Useful abbreviations
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
// GCD | |
#define async_main(aBlock) dispatch_async(dispatch_get_main_queue(), aBlock) | |
#define async_global(aBlock) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), aBlock) | |
// UIKit | |
#define Alert(aTitle,aMessage) [[[[UIAlertView alloc] initWithTitle:aTitle message:aMessage delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK",nil] autorelease] show] | |
#define NetworkAlert Alert(@"Network error",@"Please check your network connection.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Useful abbreviations for iOS and Mac development