Skip to content

Instantly share code, notes, and snippets.

@boucher
Created April 3, 2010 01:05
Show Gist options
  • Save boucher/353945 to your computer and use it in GitHub Desktop.
Save boucher/353945 to your computer and use it in GitHub Desktop.
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
contentView = [theWindow contentView];
[contentView setBackgroundColor:[CPColor yellowColor]];
label = [CPTextField labelWithTitle:@"FOO"];
[label setTextColor:[CPColor whiteColor]];
var boxedView = [CPBox boxEnclosingView:label];
[boxedView setFillColor:[CPColor blackColor]];
[boxedView setBorderColor:[CPColor whiteColor]];
[boxedView setCornerRadius:4.0];
[boxedView setBorderWidth:2.0];
[boxedView setBorderType:CPLineBorder];
[boxedView setNeedsDisplay:YES];
[boxedView setCenter:[contentView center]];
[contentView addSubview:boxedView];
[theWindow orderFront:self];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment