Skip to content

Instantly share code, notes, and snippets.

@joshholt
Created June 10, 2011 23:58
Show Gist options
  • Select an option

  • Save joshholt/1020049 to your computer and use it in GitHub Desktop.

Select an option

Save joshholt/1020049 to your computer and use it in GitHub Desktop.
My Macros That I find useful for Capp Development
#define MAIN_WINDOW [[CPWindow alloc] \
initWithContentRect:CGRectMakeZero() \
styleMask:CPBorderlessBridgeWindowMask]
#define ORDER_FRONT(arg,del) [arg orderFront:del]
#define ALLOC_ORDER_FRONT(klass,del) [[[klass alloc] init] orderFront:del]
#define SUBVIEW(to,from) [to addSubview:from]
#define VIEW_ZERO(klass) [[klass alloc] initWithFrame:CGRectMakeZero()];
#define FULL_MASK(view) [view setAutoresizingMask: CPViewMinXMargin | \
CPViewMaxXMargin | \
CPViewMinYMargin | \
CPViewMaxYMargin]
#define HUDIFY(view) [view setTheme:[CPTheme themeNamed:@"Aristo-HUD"]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment