Created
February 8, 2010 06:48
-
-
Save hammerdr/297941 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
* AppController.j | |
* ScrollViewBug | |
* | |
* Created by You on February 8, 2010. | |
* Copyright 2010, Your Company 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 aView = [[CPView alloc] initWithFrame:CGRectMakeZero()]; | |
var scrollView = [[CPScrollView alloc] initWithFrame:CGRectMakeZero()]; | |
[scrollView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; | |
var textField = [CPTextField labelWithTitle:@"Test"]; | |
[scrollView setDocumentView:textField]; | |
[aView addSubview:scrollView]; | |
[contentView addSubview:aView]; | |
[theWindow orderFront:self]; | |
[aView setFrame:CGRectMake(0, 0, 500, 500)]; | |
// Uncomment the following line to turn on the standard menu bar. | |
//[CPMenu setMenuBarVisible:YES]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment