Browse files

GridView added

  • Loading branch information...
0 parents commit 657f91247b74265bf173569bd2647a41b2326051 @AliSoftware committed Sep 2, 2010
68 GridView.h
@@ -0,0 +1,68 @@
+//
+// GridView.h
+// Clementine
+//
+// Created by Olivier on 02/09/10.
+// Copyright 2010 AliSoftware. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+/////////////////////////////////////////////////////////////////////////////
+// MARK: -
+// MARK: GridViewCell
+/////////////////////////////////////////////////////////////////////////////
+
+@interface GridViewCell : UIView {
+ NSIndexPath* indexPath;
+ UIImageView* imageView;
+ UILabel* textLabel;
+}
+@property(nonatomic,retain) UIImageView* imageView;
+@property(nonatomic,retain) UILabel* textLabel;
+@end
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+// MARK: -
+// MARK: GridView
+/////////////////////////////////////////////////////////////////////////////
+
+
+@class GridView;
+@protocol GridViewDataSource
+-(NSUInteger)numberOfItemsInGridView:(GridView*)aGridView;
+-(GridViewCell*)gridView:(GridView*)aGridView cellAtIndexPath:(NSIndexPath*)indexPath;
+@end
+
+@protocol GridViewDelegate <NSObject>
+@optional
+-(void)gridView:(GridView*)aGridView willDisplayCell:(GridViewCell*)aCell forIndexPath:(NSIndexPath*)indexPath;
+-(void)gridView:(GridView*)aGridView didSelectCellAtIndexPath:(NSIndexPath*)indexPath;
+@end
+
+/////////////////////////////////////////////////////////////////////////////
+
+@interface GridView : UIScrollView {
+ id<GridViewDelegate> delegate;
+ id<GridViewDataSource> dataSource;
+
+ NSUInteger columnsCount;
+ CGFloat rowHeight;
+ CGFloat marginWidth;
+ NSUInteger itemsCount;
+
+ NSMutableSet* visibleCells;
+ NSMutableSet* recyclePool;
+}
+-(GridViewCell*)dequeueReusableCell;
+-(void)reloadData;
+@property(nonatomic,assign) id<GridViewDelegate> delegate;
+@property(nonatomic,assign) id<GridViewDataSource> dataSource;
+@property(nonatomic,assign) NSUInteger columnsCount;
+@property(nonatomic,assign) CGFloat rowHeight;
+@property(nonatomic,assign) CGFloat marginWidth;
+@end
225 GridView.m
@@ -0,0 +1,225 @@
+//
+// GridView.m
+// Clementine
+//
+// Created by Olivier on 02/09/10.
+// Copyright 2010 AliSoftware. All rights reserved.
+//
+
+#import "GridView.h"
+
+/////////////////////////////////////////////////////////////////////////////
+// MARK: -
+// MARK: GridViewCell
+/////////////////////////////////////////////////////////////////////////////
+
+@interface GridViewCell()
+@property(nonatomic,retain) NSIndexPath* indexPath;
+@end
+
+@implementation GridViewCell
+@synthesize indexPath;
+@synthesize imageView, textLabel;
+
+/////////////////////////////////////////////////////////////////////////////
+// MARK: Init/Dealloc
+
+-(void)configure
+{
+ imageView = [[UIImageView alloc] initWithFrame:CGRectZero];
+ imageView.contentMode = UIViewContentModeScaleAspectFit;
+ [self addSubview:imageView];
+
+ textLabel = [[UILabel alloc] initWithFrame:CGRectZero];
+ textLabel.textAlignment = UITextAlignmentCenter;
+ textLabel.backgroundColor = [UIColor clearColor];
+ [self addSubview:textLabel];
+}
+
+-(id)initWithFrame:(CGRect)frame {
+ if ((self = [super initWithFrame:frame]) != nil) {
+ [self configure];
+ }
+ return self;
+}
+
+- (id)initWithCoder:(NSCoder *)decoder {
+ if ((self = [super initWithCoder:decoder]) != nil) {
+ [self configure];
+ }
+ return self;
+}
+
+-(void)dealloc {
+ [indexPath release];
+ [imageView release];
+ [textLabel release];
+ [super dealloc];
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// MARK: Tiling & Touch Mgmt
+
+-(void)layoutSubviews {
+ const CGFloat kLabelHeight = 21;
+ CGRect r = CGRectInset(self.bounds,5,5);
+ r.size.height -= kLabelHeight;
+ imageView.frame = r;
+
+ r = CGRectInset(self.bounds,5,5);
+ r.size.height = kLabelHeight;
+ r.origin.y = CGRectGetMaxY(imageView.frame);
+ textLabel.frame = r;
+}
+
+-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
+ GridView* gridView = (GridView*)self.superview;
+ if ([gridView.delegate respondsToSelector:@selector(gridView:didSelectCellAtIndexPath:)])
+ [gridView.delegate gridView:gridView didSelectCellAtIndexPath:self.indexPath];
+}
+
+@end
+
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+// MARK: -
+// MARK: GridView
+/////////////////////////////////////////////////////////////////////////////
+
+@implementation GridView
+@synthesize delegate, dataSource;
+@synthesize columnsCount, rowHeight, marginWidth;
+
+/////////////////////////////////////////////////////////////////////////////
+// MARK: Init/Dealloc
+
+-(void)configure {
+ visibleCells = [[NSMutableSet alloc] init];
+ recyclePool = [[NSMutableSet alloc] init];
+ columnsCount = 3;
+ rowHeight = 200.f;
+ marginWidth = 0.5f;
+ self.clipsToBounds = YES;
+}
+- (id) initWithCoder:(NSCoder*)aDecoder
+{
+ self = [super initWithCoder:aDecoder];
+ if (self != nil) {
+ [self configure];
+ }
+ return self;
+}
+
+- (id) initWithFrame:(CGRect)aFrame
+{
+ self = [super initWithFrame:aFrame];
+ if (self != nil) {
+ [self configure];
+ }
+ return self;
+}
+
+-(void)dealloc {
+ [visibleCells release];
+ [recyclePool release];
+ [super dealloc];
+}
+
+-(void)willMoveToWindow:(UIWindow *)newWindow {
+ if (newWindow) [self reloadData];
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// MARK: Loading & Tiling cells
+
+-(void)reloadData {
+ itemsCount = [self.dataSource numberOfItemsInGridView:self];
+ NSUInteger nbRows = (itemsCount>0) ? ((itemsCount-1) / columnsCount)+1 : 0;
+ self.contentSize = CGSizeMake(self.bounds.size.width, self.rowHeight*nbRows);
+ // remove all cells
+ for(UIView* v in visibleCells) {
+ [recyclePool addObject:v];
+ [v removeFromSuperview];
+ }
+ [visibleCells removeAllObjects];
+ // relayout and reload cells
+ [self setNeedsLayout];
+}
+
+-(void)setColumnsCount:(NSUInteger)val {
+ [self willChangeValueForKey:@"columnsCount"];
+ columnsCount = val;
+ [self didChangeValueForKey:@"columnsCount"];
+ // as previous index paths for some columns may not be accessible anymore, we need to recreate it all
+ [self reloadData]; // this will relayout and recompute the contentSize too
+}
+
+-(void)setRowHeight:(CGFloat)val {
+ [self willChangeValueForKey:@"rowHeight"];
+ rowHeight = val;
+ [self setNeedsLayout]; // no need to reload all data, only relayout.
+ [self didChangeValueForKey:@"rowHeight"];
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+-(GridViewCell*)dequeueReusableCell {
+ id obj = [recyclePool anyObject];
+ if (obj) {
+ [[obj retain] autorelease];
+ [recyclePool removeObject:obj];
+ }
+ return obj;
+}
+
+-(GridViewCell*)visibleCellForIndexPath:(NSIndexPath*)indexPath {
+ for(GridViewCell* cell in visibleCells) {
+ if (cell.indexPath == indexPath) {
+ return cell;
+ }
+ }
+ return nil;
+}
+
+-(void)layoutSubviews
+{
+ // remove cells that are no longer visible
+ for(UIView* v in visibleCells) {
+ if (!CGRectIntersectsRect(v.frame, self.bounds)) {
+ [recyclePool addObject:v];
+ [v removeFromSuperview];
+ }
+ }
+ [visibleCells minusSet:recyclePool];
+
+ if (itemsCount==0) return;
+
+ // tile missing cells
+ NSUInteger firstRow = floorf( CGRectGetMinY(self.bounds) / rowHeight );
+ firstRow = MAX(firstRow,0);
+ NSUInteger lastRow = floorf( (CGRectGetMaxY(self.bounds)-1) / rowHeight ) + 1;
+ NSUInteger totalNumRows = (itemsCount>0) ? ((itemsCount-1) / columnsCount)+1 : 0;
+ lastRow = MIN(lastRow, totalNumRows);
+ CGFloat w = self.bounds.size.width / columnsCount;
+ for(int row = firstRow; row<lastRow; ++row) {
+ for (NSUInteger col= 0; col < self.columnsCount; ++col) {
+ if (row*columnsCount+col>=itemsCount) return;
+ NSIndexPath* path = [NSIndexPath indexPathForRow:row inSection:col];
+ GridViewCell* cell = [self visibleCellForIndexPath:path];
+ if (!cell) {
+ cell = [self.dataSource gridView:self cellAtIndexPath:path];
+ cell.indexPath = path;
+ [visibleCells addObject:cell];
+ [self addSubview:cell];
+ }
+ cell.frame = CGRectInset( CGRectMake(col*w,row*rowHeight,w,rowHeight) , marginWidth,marginWidth);
+ if ([self.delegate respondsToSelector:@selector(gridView:willDisplayCell:forIndexPath:)])
+ [self.delegate gridView:self willDisplayCell:cell forIndexPath:path];
+ }
+ }
+}
+
+@end
22 GridViewExample/Classes/GridViewExampleAppDelegate.h
@@ -0,0 +1,22 @@
+//
+// GridViewExampleAppDelegate.h
+// GridViewExample
+//
+// Created by Olivier on 02/09/10.
+// Copyright AliSoftware 2010. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class GridViewExampleViewController;
+
+@interface GridViewExampleAppDelegate : NSObject <UIApplicationDelegate> {
+ UIWindow *window;
+ GridViewExampleViewController *viewController;
+}
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+@property (nonatomic, retain) IBOutlet GridViewExampleViewController *viewController;
+
+@end
+
40 GridViewExample/Classes/GridViewExampleAppDelegate.m
@@ -0,0 +1,40 @@
+//
+// GridViewExampleAppDelegate.m
+// GridViewExample
+//
+// Created by Olivier on 02/09/10.
+// Copyright AliSoftware 2010. All rights reserved.
+//
+
+#import "GridViewExampleAppDelegate.h"
+#import "GridViewExampleViewController.h"
+
+@implementation GridViewExampleAppDelegate
+
+@synthesize window;
+@synthesize viewController;
+
+
+#pragma mark -
+#pragma mark Application lifecycle
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
+ // Override point for customization after application launch.
+
+ // Add the view controller's view to the window and display.
+ [window addSubview:viewController.view];
+ [window makeKeyAndVisible];
+
+ return YES;
+}
+
+
+- (void)dealloc {
+ [viewController release];
+ [window release];
+ [super dealloc];
+}
+
+
+@end
16 GridViewExample/Classes/GridViewExampleViewController.h
@@ -0,0 +1,16 @@
+//
+// GridViewExampleViewController.h
+// GridViewExample
+//
+// Created by Olivier on 02/09/10.
+// Copyright AliSoftware 2010. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "GridView.h"
+
+@interface GridViewExampleViewController : UIViewController <GridViewDelegate, GridViewDataSource> {
+ NSArray* items;
+}
+@end
+
61 GridViewExample/Classes/GridViewExampleViewController.m
@@ -0,0 +1,61 @@
+//
+// GridViewExampleViewController.m
+// GridViewExample
+//
+// Created by Olivier on 02/09/10.
+// Copyright AliSoftware 2010. All rights reserved.
+//
+
+#import "GridViewExampleViewController.h"
+
+@implementation GridViewExampleViewController
+
+-(void)viewDidLoad {
+ // Images are courtesy of http://www.iconspedia.com/pack/iphone/
+ items = [[NSArray alloc] initWithObjects:
+ @"browser",@"calc",@"chat-blank",@"clock",@"graph",@"ipod",
+ @"mail",@"map",@"notes",@"photo",@"tools",@"wallpaper",@"weather",
+ nil];
+
+ ((GridView*)self.view).rowHeight = 100;
+ ((GridView*)self.view).columnsCount = 2;
+}
+
+-(NSUInteger)numberOfItemsInGridView:(GridView *)aGridView {
+ return [items count];
+}
+-(GridViewCell*)gridView:(GridView *)aGridView cellAtIndexPath:(NSIndexPath *)indexPath {
+ GridViewCell* cell = [aGridView dequeueReusableCell];
+ if (!cell) {
+ cell = [[[GridViewCell alloc] initWithFrame:CGRectZero] autorelease];
+ cell.backgroundColor = [UIColor grayColor];
+ }
+
+ NSUInteger i = indexPath.section + aGridView.columnsCount*indexPath.row;
+ NSString* itemName = [items objectAtIndex:i];
+ cell.textLabel.text = itemName;
+ cell.imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"%@-64x64.png",itemName]];
+
+ return cell;
+}
+-(void)gridView:(GridView *)aGridView didSelectCellAtIndexPath:(NSIndexPath *)indexPath {
+ NSUInteger idx = indexPath.section + aGridView.columnsCount*indexPath.row;
+ NSString* msg = [items objectAtIndex:idx];
+ UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Tap" message:msg delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
+ [alert show];
+ [alert release];
+}
+
+-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
+ return YES;
+}
+- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration {
+ ((GridView*)self.view).columnsCount = UIInterfaceOrientationIsPortrait(interfaceOrientation) ? 2 : 4;
+}
+
+-(void)viewDidUnload {
+ [items release];
+ items = nil;
+}
+
+@end
30 GridViewExample/GridViewExample-Info.plist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+</dict>
+</plist>
317 GridViewExample/GridViewExample.xcodeproj/project.pbxproj
@@ -0,0 +1,317 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 098D565B12301E6D0055E596 /* GridView.m in Sources */ = {isa = PBXBuildFile; fileRef = 098D565A12301E6D0055E596 /* GridView.m */; };
+ 098D566A123022DA0055E596 /* browser-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D565D123022DA0055E596 /* browser-64x64.png */; };
+ 098D566B123022DA0055E596 /* calc-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D565E123022DA0055E596 /* calc-64x64.png */; };
+ 098D566C123022DA0055E596 /* chat-blank-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D565F123022DA0055E596 /* chat-blank-64x64.png */; };
+ 098D566D123022DA0055E596 /* clock-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5660123022DA0055E596 /* clock-64x64.png */; };
+ 098D566E123022DA0055E596 /* graph-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5661123022DA0055E596 /* graph-64x64.png */; };
+ 098D566F123022DA0055E596 /* ipod-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5662123022DA0055E596 /* ipod-64x64.png */; };
+ 098D5670123022DA0055E596 /* mail-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5663123022DA0055E596 /* mail-64x64.png */; };
+ 098D5671123022DA0055E596 /* map-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5664123022DA0055E596 /* map-64x64.png */; };
+ 098D5672123022DA0055E596 /* notes-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5665123022DA0055E596 /* notes-64x64.png */; };
+ 098D5673123022DA0055E596 /* photo-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5666123022DA0055E596 /* photo-64x64.png */; };
+ 098D5674123022DA0055E596 /* tools-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5667123022DA0055E596 /* tools-64x64.png */; };
+ 098D5675123022DA0055E596 /* wallpaper-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5668123022DA0055E596 /* wallpaper-64x64.png */; };
+ 098D5676123022DA0055E596 /* weather-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5669123022DA0055E596 /* weather-64x64.png */; };
+ 1D3623260D0F684500981E51 /* GridViewExampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* GridViewExampleAppDelegate.m */; };
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
+ 2899E5220DE3E06400AC0155 /* GridViewExampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* GridViewExampleViewController.xib */; };
+ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
+ 28D7ACF80DDB3853001CB0EB /* GridViewExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* GridViewExampleViewController.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 098D565912301E6D0055E596 /* GridView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GridView.h; path = ../GridView.h; sourceTree = SOURCE_ROOT; };
+ 098D565A12301E6D0055E596 /* GridView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GridView.m; path = ../GridView.m; sourceTree = SOURCE_ROOT; };
+ 098D565D123022DA0055E596 /* browser-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "browser-64x64.png"; sourceTree = "<group>"; };
+ 098D565E123022DA0055E596 /* calc-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "calc-64x64.png"; sourceTree = "<group>"; };
+ 098D565F123022DA0055E596 /* chat-blank-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "chat-blank-64x64.png"; sourceTree = "<group>"; };
+ 098D5660123022DA0055E596 /* clock-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "clock-64x64.png"; sourceTree = "<group>"; };
+ 098D5661123022DA0055E596 /* graph-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "graph-64x64.png"; sourceTree = "<group>"; };
+ 098D5662123022DA0055E596 /* ipod-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ipod-64x64.png"; sourceTree = "<group>"; };
+ 098D5663123022DA0055E596 /* mail-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mail-64x64.png"; sourceTree = "<group>"; };
+ 098D5664123022DA0055E596 /* map-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "map-64x64.png"; sourceTree = "<group>"; };
+ 098D5665123022DA0055E596 /* notes-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "notes-64x64.png"; sourceTree = "<group>"; };
+ 098D5666123022DA0055E596 /* photo-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photo-64x64.png"; sourceTree = "<group>"; };
+ 098D5667123022DA0055E596 /* tools-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tools-64x64.png"; sourceTree = "<group>"; };
+ 098D5668123022DA0055E596 /* wallpaper-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "wallpaper-64x64.png"; sourceTree = "<group>"; };
+ 098D5669123022DA0055E596 /* weather-64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "weather-64x64.png"; sourceTree = "<group>"; };
+ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 1D3623240D0F684500981E51 /* GridViewExampleAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridViewExampleAppDelegate.h; sourceTree = "<group>"; };
+ 1D3623250D0F684500981E51 /* GridViewExampleAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GridViewExampleAppDelegate.m; sourceTree = "<group>"; };
+ 1D6058910D05DD3D006BFB54 /* GridViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GridViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 2899E5210DE3E06400AC0155 /* GridViewExampleViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GridViewExampleViewController.xib; sourceTree = "<group>"; };
+ 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
+ 28D7ACF60DDB3853001CB0EB /* GridViewExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridViewExampleViewController.h; sourceTree = "<group>"; };
+ 28D7ACF70DDB3853001CB0EB /* GridViewExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GridViewExampleViewController.m; sourceTree = "<group>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 32CA4F630368D1EE00C91783 /* GridViewExample_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridViewExample_Prefix.pch; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* GridViewExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GridViewExample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
+ 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 1D3623240D0F684500981E51 /* GridViewExampleAppDelegate.h */,
+ 1D3623250D0F684500981E51 /* GridViewExampleAppDelegate.m */,
+ 28D7ACF60DDB3853001CB0EB /* GridViewExampleViewController.h */,
+ 28D7ACF70DDB3853001CB0EB /* GridViewExampleViewController.m */,
+ 098D565912301E6D0055E596 /* GridView.h */,
+ 098D565A12301E6D0055E596 /* GridView.m */,
+ );
+ path = Classes;
+ sourceTree = "<group>";
+ };
+ 098D565C123022DA0055E596 /* icons */ = {
+ isa = PBXGroup;
+ children = (
+ 098D565D123022DA0055E596 /* browser-64x64.png */,
+ 098D565E123022DA0055E596 /* calc-64x64.png */,
+ 098D565F123022DA0055E596 /* chat-blank-64x64.png */,
+ 098D5660123022DA0055E596 /* clock-64x64.png */,
+ 098D5661123022DA0055E596 /* graph-64x64.png */,
+ 098D5662123022DA0055E596 /* ipod-64x64.png */,
+ 098D5663123022DA0055E596 /* mail-64x64.png */,
+ 098D5664123022DA0055E596 /* map-64x64.png */,
+ 098D5665123022DA0055E596 /* notes-64x64.png */,
+ 098D5666123022DA0055E596 /* photo-64x64.png */,
+ 098D5667123022DA0055E596 /* tools-64x64.png */,
+ 098D5668123022DA0055E596 /* wallpaper-64x64.png */,
+ 098D5669123022DA0055E596 /* weather-64x64.png */,
+ );
+ path = icons;
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 1D6058910D05DD3D006BFB54 /* GridViewExample.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = CustomTemplate;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32CA4F630368D1EE00C91783 /* GridViewExample_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 2899E5210DE3E06400AC0155 /* GridViewExampleViewController.xib */,
+ 28AD733E0D9D9553002E5188 /* MainWindow.xib */,
+ 098D565C123022DA0055E596 /* icons */,
+ 8D1107310486CEB800E47090 /* GridViewExample-Info.plist */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
+ 1D30AB110D05D00D00671497 /* Foundation.framework */,
+ 288765A40DF7441C002DB57D /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 1D6058900D05DD3D006BFB54 /* GridViewExample */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "GridViewExample" */;
+ buildPhases = (
+ 1D60588D0D05DD3D006BFB54 /* Resources */,
+ 1D60588E0D05DD3D006BFB54 /* Sources */,
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = GridViewExample;
+ productName = GridViewExample;
+ productReference = 1D6058910D05DD3D006BFB54 /* GridViewExample.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "GridViewExample" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 1D6058900D05DD3D006BFB54 /* GridViewExample */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 1D60588D0D05DD3D006BFB54 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
+ 2899E5220DE3E06400AC0155 /* GridViewExampleViewController.xib in Resources */,
+ 098D566A123022DA0055E596 /* browser-64x64.png in Resources */,
+ 098D566B123022DA0055E596 /* calc-64x64.png in Resources */,
+ 098D566C123022DA0055E596 /* chat-blank-64x64.png in Resources */,
+ 098D566D123022DA0055E596 /* clock-64x64.png in Resources */,
+ 098D566E123022DA0055E596 /* graph-64x64.png in Resources */,
+ 098D566F123022DA0055E596 /* ipod-64x64.png in Resources */,
+ 098D5670123022DA0055E596 /* mail-64x64.png in Resources */,
+ 098D5671123022DA0055E596 /* map-64x64.png in Resources */,
+ 098D5672123022DA0055E596 /* notes-64x64.png in Resources */,
+ 098D5673123022DA0055E596 /* photo-64x64.png in Resources */,
+ 098D5674123022DA0055E596 /* tools-64x64.png in Resources */,
+ 098D5675123022DA0055E596 /* wallpaper-64x64.png in Resources */,
+ 098D5676123022DA0055E596 /* weather-64x64.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 1D60588E0D05DD3D006BFB54 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */,
+ 1D3623260D0F684500981E51 /* GridViewExampleAppDelegate.m in Sources */,
+ 28D7ACF80DDB3853001CB0EB /* GridViewExampleViewController.m in Sources */,
+ 098D565B12301E6D0055E596 /* GridView.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 1D6058940D05DD3E006BFB54 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = GridViewExample_Prefix.pch;
+ INFOPLIST_FILE = "GridViewExample-Info.plist";
+ PRODUCT_NAME = GridViewExample;
+ };
+ name = Debug;
+ };
+ 1D6058950D05DD3E006BFB54 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = GridViewExample_Prefix.pch;
+ INFOPLIST_FILE = "GridViewExample-Info.plist";
+ PRODUCT_NAME = GridViewExample;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = iphoneos4.0;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ PREBINDING = NO;
+ SDKROOT = iphoneos4.0;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "GridViewExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1D6058940D05DD3E006BFB54 /* Debug */,
+ 1D6058950D05DD3E006BFB54 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "GridViewExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
391 GridViewExample/GridViewExampleViewController.xib
@@ -0,0 +1,391 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1024</int>
+ <string key="IBDocument.SystemVersion">10F569</string>
+ <string key="IBDocument.InterfaceBuilderVersion">788</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">117</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="6"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC43NQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="774585933"/>
+ <reference key="destination" ref="372490531"/>
+ </object>
+ <int key="connectionID">8</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="774585933"/>
+ <reference key="destination" ref="372490531"/>
+ </object>
+ <int key="connectionID">9</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>6.CustomClassName</string>
+ <string>6.IBEditorWindowLastContentRect</string>
+ <string>6.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>GridViewExampleViewController</string>
+ <string>UIResponder</string>
+ <string>GridView</string>
+ <string>{{239, 376}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">9</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">GridView</string>
+ <string key="superclassName">UIScrollView</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>dataSource</string>
+ <string>delegate</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>dataSource</string>
+ <string>delegate</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">dataSource</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">delegate</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">../GridView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">GridViewExampleViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/GridViewExampleViewController.h</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="959752681">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="959752681"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIScrollView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="1024" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">GridViewExample.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">117</string>
+ </data>
+</archive>
8 GridViewExample/GridViewExample_Prefix.pch
@@ -0,0 +1,8 @@
+//
+// Prefix header for all source files of the 'GridViewExample' target in the 'GridViewExample' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+ #import <UIKit/UIKit.h>
+#endif
444 GridViewExample/MainWindow.xib
@@ -0,0 +1,444 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1024</int>
+ <string key="IBDocument.SystemVersion">10D571</string>
+ <string key="IBDocument.InterfaceBuilderVersion">786</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">460.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">112</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="10"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="427554174">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIViewController" id="943309135">
+ <string key="IBUINibName">GridViewExampleViewController</string>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="interfaceOrientation">1</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIHorizontal">NO</bool>
+ </object>
+ <object class="IBUIWindow" id="117978783">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 480}</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIResizesToFullScreen">YES</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">viewController</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="943309135"/>
+ </object>
+ <int key="connectionID">11</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="117978783"/>
+ </object>
+ <int key="connectionID">14</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">GridViewExample App Delegate</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="427554174"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="943309135"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="117978783"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>10.CustomClassName</string>
+ <string>10.IBEditorWindowLastContentRect</string>
+ <string>10.IBPluginDependency</string>
+ <string>12.IBEditorWindowLastContentRect</string>
+ <string>12.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <string>GridViewExampleViewController</string>
+ <string>{{234, 376}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{525, 346}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>GridViewExampleAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">15</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWindow</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">GridViewExampleAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>viewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>GridViewExampleViewController</string>
+ <string>UIWindow</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>viewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">viewController</string>
+ <string key="candidateClassName">GridViewExampleViewController</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">window</string>
+ <string key="candidateClassName">UIWindow</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/GridViewExampleAppDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">GridViewExampleAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">GridViewExampleViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/GridViewExampleViewController.h</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="356479594">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIApplication</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="356479594"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWindow</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="1024" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">GridViewExample.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">112</string>
+ </data>
+</archive>
BIN GridViewExample/icons/browser-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/calc-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/chat-blank-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/clock-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/graph-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/ipod-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/mail-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/map-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/notes-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/photo-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/tools-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/wallpaper-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN GridViewExample/icons/weather-64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 GridViewExample/main.m
@@ -0,0 +1,17 @@
+//
+// main.m
+// GridViewExample
+//
+// Created by Olivier on 02/09/10.
+// Copyright AliSoftware 2010. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+int main(int argc, char *argv[]) {
+
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
+ [pool release];
+ return retVal;
+}
14 README
@@ -0,0 +1,14 @@
+This class allows you to display a grid of views.
+Its API is very similar to the API of UITableView : it can reuses/recycle cells to avoid too much allocations and it uses tiling to avoid having a too big memory footprint.
+
+You can configure its properties like rowHeight, columnCount, �
+
+Then, to use it, you simply have to implement the methods of the GridViewDataSource protocol, like you would do for a UITableView:
+-(NSUInteger)numberOfItemsInGridView:(GridView *)aGridView;
+-(GridViewCell*)gridView:(GridView *)aGridView cellAtIndexPath:(NSIndexPath *)indexPath;
+
+You can also implement the GridViewDelegate protocol especially to handle when a cell is tapped:
+-(void)gridView:(GridView *)aGridView didSelectCellAtIndexPath:(NSIndexPath *)indexPath;
+
+
+See the "GridViewExample" project for a basic usage example (including changing the number of columns used when the iPhone orientation changes)

0 comments on commit 657f912

Please sign in to comment.