Created
April 21, 2011 17:21
-
-
Save toddfreese/935031 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 | |
| * Testing | |
| * | |
| * Created by You on April 21, 2011. | |
| * Copyright 2011, Your Company All rights reserved. | |
| */ | |
| @import <Foundation/CPObject.j> | |
| @implementation AppController : CPObject | |
| { | |
| } | |
| - (void)applicationDidFinishLaunching:(CPNotification)aNotification | |
| { | |
| var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask]; | |
| var contentView = [theWindow contentView]; | |
| var backgroundImageView = [[CPImageView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth([contentView bounds]), CGRectGetHeight([contentView bounds]))]; | |
| [backgroundImageView setImage:[[CPImage alloc] initWithContentsOfFile:@"http://a.filmworkers.com/VIT_BG_04.jpg" size:CGSizeMake(2560, 1600)]]; | |
| [backgroundImageView setImageScaling:CPScaleNone]; | |
| [backgroundImageView setHasShadow:NO]; | |
| [backgroundImageView setImageAlignment:CPImageAlignLeft]; | |
| [backgroundImageView setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin | CPViewWidthSizable | CPViewHeightSizable]; | |
| [contentView addSubview:backgroundImageView]; | |
| [theWindow orderFront:self]; | |
| // 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