Created
June 4, 2009 23:45
-
-
Save j4johnfox/123932 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
- (void)configureThumbnailScroller | |
{ | |
[thumbnailsContainerView setBackgroundColor:[CPColor blackColor]]; | |
var photosListItem = [[CPCollectionViewItem alloc] init]; | |
[photosListItem setView:[[MMSPhotoCell alloc] initWithFrame:CGRectMakeZero()]]; | |
photosCollectionView = [[CPCollectionView alloc] initWithFrame:CGRectMake(0, 0, | |
([thumbnailsScrollView frame].size.width), [thumbnailsScrollView frame].size.height)]; | |
[photosCollectionView setDelegate:self]; | |
[photosCollectionView setMinItemSize:CGSizeMake(90, 90)]; | |
[photosCollectionView setMaxItemSize:CGSizeMake(90, 90)]; | |
[photosCollectionView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; | |
[photosCollectionView setMaxNumberOfRows:1]; | |
[photosCollectionView setMaxNumberOfColumns:0]; | |
[photosCollectionView setVerticalMargin:0.0]; | |
[photosCollectionView setItemPrototype:photosListItem]; | |
[thumbnailsScrollView setDocumentView:photosCollectionView]; | |
[thumbnailsScrollView setHasHorizontalScroller:YES]; | |
[thumbnailsScrollView setHasVerticalScroller:NO]; | |
[thumbnailsContainerView setHidden:YES]; | |
var thumbnailContainerFrame = CGRectCreateCopy([thumbnailsContainerView frame]); | |
thumbnailContainerFrame.size.width = [[[CPApp mainWindow] contentView] frame].size.width; | |
[thumbnailsContainerView setFrame:thumbnailContainerFrame]; | |
[[[CPApp mainWindow] contentView] addSubview:thumbnailsContainerView]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment