Created
September 23, 2008 09:49
-
-
Save richcollins/12253 to your computer and use it in GitHub Desktop.
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
var theWindow = [[CPWindow alloc] | |
initWithContentRect:CGRectMakeZero() | |
styleMask:CPBorderlessBridgeWindowMask | |
]; | |
_contentView = [theWindow contentView]; | |
var bounds = [_contentView bounds]; | |
var boxSideLength = 10; | |
var boxMargin = 10; | |
var boxX = CPRectGetWidth(bounds) - boxMargin - boxSideLength; | |
var boxY = CPRectGetHeight(bounds) - boxMargin - boxSideLength; | |
var box = [[CPView alloc] initWithFrame:CPRectMake(boxX, boxY, boxSideLength, boxSideLength)]; | |
[box setBackgroundColor:[CPColor blackColor]]; | |
[box setAutoresizingMask:CPViewMinXMargin|CPViewMinYMargin]; | |
[_contentView addSubview:box]; | |
[theWindow orderFront:self]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment