Skip to content

Instantly share code, notes, and snippets.

@bpaf
Created February 18, 2011 11:26
Show Gist options
  • Save bpaf/833560 to your computer and use it in GitHub Desktop.
Save bpaf/833560 to your computer and use it in GitHub Desktop.
class method
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
contentView = [theWindow contentView];
var bounds = [contentView bounds],
width = CPRectGetWidth(bounds),
height = CPRectGetHeight(bounds);
var buttonBar = [[CPButtonBar alloc] initWithFrame:CGRectMake(0, height - 25, width, 25)];
[buttonBar setAutoresizingMask:CPViewWidthSizable];
var b1 = [CPButtonBar plusButton];
var buttons = [b1];
[buttonBar setButtons:buttons];
[contentView addSubview:buttonBar];
// Error:
// Uncaught CPInvalidArgumentException: + [CPButtonBar plusButton] unrecognized selector sent to class 0x000917
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment