Created
February 10, 2010 13:49
-
-
Save vojto/300319 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
// *** Navigation View | |
var navigationView = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 230, CGRectGetHeight([contentView bounds]))]; | |
var sidebarPatternImage = [[CPImage alloc] initWithContentsOfFile:@"Resources/sidebar.png"]; | |
var sidebarBackground = [CPColor colorWithPatternImage:sidebarPatternImage]; | |
[navigationView setBackgroundColor:sidebarBackground]; | |
// *** Main View | |
var mainView = [[CPView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth([contentView bounds])-230, CGRectGetHeight([contentView bounds]))]; | |
[mainView setAutoresizingMask: CPViewHeightSizable | CPViewWidthSizable] | |
// [mainView setAutoresizingMask:CPViewWidthSizable]; | |
[mainView setBackgroundColor:[CPColor colorWithHexString:@"f0f0f0"]]; | |
// *** Split View | |
var splitView = [[CPSplitView alloc] initWithFrame:[containerView bounds]]; | |
[splitView setAutoresizingMask:CPViewHeightSizable | CPViewWidthSizable ]; | |
[splitView setVertical:YES]; | |
[splitView setIsPaneSplitter:YES]; | |
[splitView addSubview:navigationView]; | |
[splitView addSubview:mainView]; | |
[containerView addSubview:splitView]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment