Skip to content

Instantly share code, notes, and snippets.

@eliaskg
Created November 13, 2009 16:50
Show Gist options
  • Save eliaskg/233969 to your computer and use it in GitHub Desktop.
Save eliaskg/233969 to your computer and use it in GitHub Desktop.
_windowWidth = CGRectGetWidth([_contentView bounds]);
_windowHeight = CGRectGetHeight([_contentView bounds]),
_headerHeight = 53,
_sourceWidth = 300;
_splitView = [[CPSplitView alloc] initWithFrame:CGRectMake(0, _headerHeight, _windowWidth, _windowHeight - _headerHeight)];
[_splitView setVertical:YES];
[_splitView setIsPaneSplitter:YES];
[_splitView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
[_splitView setDelegate:self];
[_contentView addSubview:_splitView];
_sourceView = [[TTSourceView alloc] initWithFrame:CGRectMake(0, 0, _sourceWidth, _windowHeight - _headerHeight)];
[_splitView addSubview:_sourceView];
var listContainer = [[CPView alloc] initWithFrame:CGRectMake(0, 0, _windowWidth - _sourceWidth, _windowHeight - _headerHeight)];
[listContainer setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
[_splitView addSubview:listContainer];
_listView = [[TTListView alloc] initWithFrame:CGRectMake(0, 0, _windowWidth - _sourceWidth, _windowHeight - _headerHeight)];
[listContainer addSubview:_listView];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment