Skip to content

Instantly share code, notes, and snippets.

@tbalthazar
Created March 26, 2009 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbalthazar/85978 to your computer and use it in GitHub Desktop.
Save tbalthazar/85978 to your computer and use it in GitHub Desktop.
/*
* AppController.j
*
* Created by __Me__ on __Date__.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
contentView = [theWindow contentView];
var scrollView = [[CPScrollView alloc] initWithFrame:[contentView bounds]];
var aView = [[CPView alloc] initWithFrame:CGRectMake(10, 10, 600, 400)] ;
[aView setBackgroundColor:[CPColor redColor]] ;
[scrollView setDocumentView:aView];
[scrollView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
[scrollView setAutohidesScrollers:YES];
[contentView addSubview:scrollView];
[theWindow orderFront:self];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment