Created
May 12, 2009 19:49
-
-
Save saikat/110693 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
widgetsCollection = [[CPCollectionView alloc] initWithFrame:bounds]; | |
[widgetsCollection setMinItemSize:CGSizeMake(100, 100)]; | |
[widgetsCollection setMaxItemSize:CGSizeMake(100, 100)]; | |
[widgetsCollection setAutoresizingMask:CPViewWidthSizable]; | |
[widgetsCollection setDelegate:self]; | |
var itemPrototype = [[CPCollectionViewItem alloc] init]; | |
[itemPrototype setView:[[WidgetView alloc] initWithFrame:CGRectMakeZero()]]; | |
[widgetsCollection setItemPrototype:itemPrototype]; | |
var widget = [[TextWidget alloc] initWithFrame:CGRectMake(0, 0, 90.0, 90.0)]; | |
var widget1 = [[TextWidget alloc] initWithFrame:CGRectMake(0, 0, 90.0, 90.0)]; | |
var widget2 = [[TextWidget alloc] initWithFrame:CGRectMake(0, 0, 90.0, 90.0)]; | |
widgets = [widget, widget1, widget2]; | |
[widgetsCollection setContent:widgets]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment