Skip to content

Instantly share code, notes, and snippets.

@agoodman
Created July 18, 2011 17:10
Show Gist options
  • Select an option

  • Save agoodman/1090073 to your computer and use it in GitHub Desktop.

Select an option

Save agoodman/1090073 to your computer and use it in GitHub Desktop.
Useful abbreviations
// 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.")
@agoodman
Copy link
Copy Markdown
Author

Useful abbreviations for iOS and Mac development

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment