Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

RE-FIX cosmetic bug that made scrollbar indicators to be masked by ce…

…lls when scrolling. Added tab in example project to demonstrate performance with a grid view of 10000 cells
  • Loading branch information...
commit 372615dde85eb11b055143daf5a3ac1d30733fba 1 parent c2899f5
@AliSoftware authored
View
22 GridViewExample/Classes/GridViewExampleAppDelegate.h
@@ -1,22 +0,0 @@
-//
-// 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, arc_strong) IBOutlet UIWindow *window;
-@property (nonatomic, arc_strong) IBOutlet GridViewExampleViewController *viewController;
-
-@end
-
View
41 GridViewExample/Classes/GridViewExampleAppDelegate.m
@@ -1,41 +0,0 @@
-//
-// 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;
-}
-
-#if ! ARC_ENABLED
-- (void)dealloc
-{
- [viewController release];
- [window release];
- [super dealloc];
-}
-#endif
-
-@end
View
4 GridViewExample/Classes/GridViewExampleViewController.h
@@ -10,8 +10,6 @@
#import "OHGridView.h"
@interface GridViewExampleViewController : UIViewController
- <UIAlertViewDelegate, OHGridViewDelegate, OHGridViewDataSource> {
- NSArray* items;
-}
+ <UIAlertViewDelegate, OHGridViewDelegate, OHGridViewDataSource>
@end
View
49 GridViewExample/Classes/GridViewExampleViewController.m
@@ -8,12 +8,22 @@
#import "GridViewExampleViewController.h"
+@interface GridViewExampleViewController ()
+@property(nonatomic, retain) NSArray* items;
+@end
+
+
+
@implementation GridViewExampleViewController
+@synthesize items = _items;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark - Setup & Teardown
-(void)viewDidLoad
{
// Images are courtesy of http://www.iconspedia.com/pack/iphone/
- items = [[NSArray alloc] initWithObjects:
+ _items = [[NSArray alloc] initWithObjects:
@"browser",@"calc",@"chat-blank",@"clock",@"graph",@"ipod",
@"mail",@"map",@"notes",@"photo",@"tools",@"wallpaper",@"weather",
nil];
@@ -22,9 +32,27 @@ -(void)viewDidLoad
((OHGridView*)self.view).columnsCount = 2;
}
+-(void)viewDidUnload
+{
+ noarc_release(items);
+ self.items = nil;
+}
+
+#if ! ARC_ENABLED
+-(void)dealloc
+{
+ [_items release];
+ [super dealloc];
+}
+#endif
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark - OHGridView Delegate & DataSource
+
-(NSUInteger)numberOfItemsInOHGridView:(OHGridView *)aGridView
{
- return [items count];
+ return [self.items count];
}
-(OHGridViewCell*)OHGridView:(OHGridView *)aGridView cellAtIndexPath:(NSIndexPath *)indexPath
@@ -46,7 +74,7 @@ -(OHGridViewCell*)OHGridView:(OHGridView *)aGridView cellAtIndexPath:(NSIndexPat
}
NSUInteger i = [aGridView indexForIndexPath:indexPath];
- NSString* itemName = [items objectAtIndex:i];
+ NSString* itemName = [self.items objectAtIndex:i];
cell.textLabel.text = itemName;
cell.imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"%@-64x64.png",itemName]];
@@ -56,7 +84,7 @@ -(OHGridViewCell*)OHGridView:(OHGridView *)aGridView cellAtIndexPath:(NSIndexPat
-(void)OHGridView:(OHGridView *)aGridView didSelectCellAtIndexPath:(NSIndexPath *)indexPath
{
NSUInteger idx = [aGridView indexForIndexPath:indexPath];
- NSString* msg = [items objectAtIndex:idx];
+ NSString* msg = [self.items objectAtIndex:idx];
UIAlertView* alert = noarc_autorelease([[UIAlertView alloc] initWithTitle:@"Tap"
message:msg
delegate:self
@@ -64,11 +92,18 @@ -(void)OHGridView:(OHGridView *)aGridView didSelectCellAtIndexPath:(NSIndexPath
otherButtonTitles:nil]);
[alert show];
}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark - UIAlertView Delegate
+
-(void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
[(OHGridView*)self.view deselectSelectedCellsAnimated:YES];
}
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark - Interface Orientation
+
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return YES;
@@ -79,10 +114,4 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interf
((OHGridView*)self.view).columnsCount = UIInterfaceOrientationIsPortrait(interfaceOrientation) ? 2 : 4;
}
--(void)viewDidUnload
-{
- noarc_release(items);
- items = nil;
-}
-
@end
View
14 GridViewExample/Classes/GridViewPerformanceViewController.h
@@ -0,0 +1,14 @@
+//
+// GridViewPerformanceViewController.h
+// GridViewExample
+//
+// Created by Olivier Halligon on 09/09/12.
+//
+//
+
+#import <UIKit/UIKit.h>
+#import "OHGridView.h"
+
+@interface GridViewPerformanceViewController : UIViewController <OHGridViewDataSource>
+
+@end
View
73 GridViewExample/Classes/GridViewPerformanceViewController.m
@@ -0,0 +1,73 @@
+//
+// GridViewPerformanceViewController.m
+// GridViewExample
+//
+// Created by Olivier Halligon on 09/09/12.
+//
+//
+
+#import "GridViewPerformanceViewController.h"
+
+@interface GridViewPerformanceViewController ()
+
+@end
+
+@implementation GridViewPerformanceViewController
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark - Setup & Teardown
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ // Custom initialization
+ }
+ return self;
+}
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view.
+ OHGridView* grid = (OHGridView*)self.view;
+ grid.columnsCount = 5;
+ grid.rowHeight = 80;
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+}
+
+-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+{
+ return YES;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma mark - OHGridView DataSource
+
+#define kItemsCount 10000
+
+-(NSUInteger)numberOfItemsInOHGridView:(OHGridView *)aGridView
+{
+ return kItemsCount;
+}
+
+-(OHGridViewCell *)OHGridView:(OHGridView *)aGridView cellAtIndexPath:(NSIndexPath *)indexPath
+{
+ OHGridViewCell* cell = [aGridView dequeueReusableCell];
+ if (!cell)
+ {
+ cell = [OHGridViewCell cell];
+ }
+ CGFloat hue = fmodf([aGridView indexForIndexPath:indexPath] / 20.f , 1.0f);
+ CGFloat lum = (([aGridView indexForIndexPath:indexPath] / 20) % 2 == 0) ? 0.5f : 1.f;
+ cell.backgroundColor = [UIColor colorWithHue:hue saturation:0.5 brightness:lum alpha:1.0];
+ cell.textLabel.text = [NSString stringWithFormat:@"%d,%d", indexPath.row, indexPath.section];
+ return cell;
+}
+
+@end
View
20 GridViewExample/GridViewExample.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ 090B5EBE15FD19AF0054FA12 /* GridViewPerformanceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 090B5EBD15FD19AF0054FA12 /* GridViewPerformanceViewController.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 */; };
@@ -22,17 +23,17 @@
098D5676123022DA0055E596 /* weather-64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 098D5669123022DA0055E596 /* weather-64x64.png */; };
09BAC51712E255DF00C3B95B /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 09BAC51612E255DF00C3B95B /* Icon.png */; };
09F6EC8715FD01D700A493F3 /* libOHGridView.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 09F6EC8615FD01D700A493F3 /* libOHGridView.a */; };
- 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 */
+ 090B5EBC15FD19AF0054FA12 /* GridViewPerformanceViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridViewPerformanceViewController.h; sourceTree = "<group>"; };
+ 090B5EBD15FD19AF0054FA12 /* GridViewPerformanceViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GridViewPerformanceViewController.m; sourceTree = "<group>"; };
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>"; };
@@ -49,12 +50,9 @@
09BAC51612E255DF00C3B95B /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
09F6EC8615FD01D700A493F3 /* libOHGridView.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOHGridView.a; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
@@ -81,10 +79,10 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
- 1D3623240D0F684500981E51 /* GridViewExampleAppDelegate.h */,
- 1D3623250D0F684500981E51 /* GridViewExampleAppDelegate.m */,
28D7ACF60DDB3853001CB0EB /* GridViewExampleViewController.h */,
28D7ACF70DDB3853001CB0EB /* GridViewExampleViewController.m */,
+ 090B5EBC15FD19AF0054FA12 /* GridViewPerformanceViewController.h */,
+ 090B5EBD15FD19AF0054FA12 /* GridViewPerformanceViewController.m */,
);
path = Classes;
sourceTree = "<group>";
@@ -142,7 +140,6 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
- 2899E5210DE3E06400AC0155 /* GridViewExampleViewController.xib */,
28AD733E0D9D9553002E5188 /* MainWindow.xib */,
098D565C123022DA0055E596 /* icons */,
8D1107310486CEB800E47090 /* GridViewExample-Info.plist */,
@@ -214,7 +211,6 @@
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 */,
@@ -240,8 +236,8 @@
buildActionMask = 2147483647;
files = (
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
- 1D3623260D0F684500981E51 /* GridViewExampleAppDelegate.m in Sources */,
28D7ACF80DDB3853001CB0EB /* GridViewExampleViewController.m in Sources */,
+ 090B5EBE15FD19AF0054FA12 /* GridViewPerformanceViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -289,8 +285,7 @@
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 3.2;
- OTHER_CFLAGS = "-D__IPHONE_OS_VERSION_MIN_REQUIRED=30200";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
SDKROOT = iphoneos;
};
name = Debug;
@@ -306,6 +301,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
};
View
214 GridViewExample/GridViewExampleViewController.xib
@@ -1,214 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
- <data>
- <int key="IBDocument.SystemTarget">1280</int>
- <string key="IBDocument.SystemVersion">10K549</string>
- <string key="IBDocument.InterfaceBuilderVersion">1938</string>
- <string key="IBDocument.AppKitVersion">1038.36</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">933</string>
- </object>
- <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>IBProxyObject</string>
- <string>IBUIView</string>
- </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">
- <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
- <integer value="1" key="NS.object.0"/>
- </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="NSFrame">{{0, 20}, {320, 460}}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
- <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">gridViewDataSource</string>
- <reference key="source" ref="774585933"/>
- <reference key="destination" ref="372490531"/>
- </object>
- <int key="connectionID">10</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">gridViewDelegate</string>
- <reference key="source" ref="774585933"/>
- <reference key="destination" ref="372490531"/>
- </object>
- <int key="connectionID">11</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>
- <object class="NSArray" key="object" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <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>-1.IBPluginDependency</string>
- <string>-2.CustomClassName</string>
- <string>-2.IBPluginDependency</string>
- <string>6.CustomClassName</string>
- <string>6.IBPluginDependency</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>GridViewExampleViewController</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>UIResponder</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>OHGridView</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"/>
- <reference key="dict.values" ref="0"/>
- </object>
- <nil key="activeLocalization"/>
- <object class="NSMutableDictionary" key="localizations">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <reference key="dict.values" ref="0"/>
- </object>
- <nil key="sourceID"/>
- <int key="maxID">11</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <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 class="IBPartialClassDescription">
- <string key="className">OHGridView</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>gridViewDataSource</string>
- <string>gridViewDelegate</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>gridViewDataSource</string>
- <string>gridViewDelegate</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBToOneOutletInfo">
- <string key="name">gridViewDataSource</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">gridViewDelegate</string>
- <string key="candidateClassName">id</string>
- </object>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/OHGridView.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>
- <real value="1280" 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>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">933</string>
- </data>
-</archive>
View
529 GridViewExample/MainWindow.xib
@@ -2,30 +2,31 @@
<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>
+ <string key="IBDocument.SystemVersion">12B19</string>
+ <string key="IBDocument.InterfaceBuilderVersion">2549</string>
+ <string key="IBDocument.AppKitVersion">1187</string>
+ <string key="IBDocument.HIToolboxVersion">624.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>
+ <string key="NS.object.0">1498</string>
</object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="10"/>
+ <string>IBProxyObject</string>
+ <string>IBUITabBar</string>
+ <string>IBUITabBarController</string>
+ <string>IBUITabBarItem</string>
+ <string>IBUIView</string>
+ <string>IBUIViewController</string>
+ <string>IBUIWindow</string>
</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>
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -37,22 +38,96 @@
<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="IBUITabBarController" id="312386433">
+ <object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics" id="453653081"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
+ <object class="IBUIViewController" key="IBUISelectedViewController" id="684696339">
+ <object class="IBUIView" key="IBUIView" id="538359114">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrame">{{0, 20}, {320, 411}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSNextKeyView" ref="986298735"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDAuODcyNTE5Mzg4NwA</bytes>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUITabBarItem" key="IBUITabBarItem" id="483949957">
+ <string key="IBUITitle">Performance Test</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <reference key="IBUIParentViewController" ref="312386433"/>
+ <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="IBUIInterfaceOrientation">1</int>
+ <int key="interfaceOrientation">1</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIHorizontal">NO</bool>
+ </object>
+ <object class="NSMutableArray" key="IBUIViewControllers">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIViewController" id="943309135">
+ <object class="IBUIView" key="IBUIView" id="198080756">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrame">{{0, 20}, {320, 411}}</string>
+ <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"/>
+ <reference key="IBUISimulatedBottomBarMetrics" ref="453653081"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUITabBarItem" key="IBUITabBarItem" id="2203468">
+ <string key="IBUITitle">Standard Example</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <reference key="IBUIParentViewController" ref="312386433"/>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="IBUIInterfaceOrientation">1</int>
+ <int key="interfaceOrientation">1</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIHorizontal">NO</bool>
+ </object>
+ <reference ref="684696339"/>
+ </object>
+ <object class="IBUITabBar" key="IBUITabBar" id="986298735">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">266</int>
+ <string key="NSFrame">{{0, 431}, {320, 49}}</string>
+ <reference key="NSSuperview"/>
+ <string key="NSReuseIdentifierKey">_NS:29</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwAA</bytes>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
</object>
<object class="IBUIWindow" id="117978783">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
<string key="NSFrameSize">{320, 480}</string>
+ <reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
@@ -61,6 +136,7 @@
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIVisibleAtLaunch">YES</bool>
<bool key="IBUIResizesToFullScreen">YES</bool>
</object>
</object>
@@ -69,27 +145,43 @@
<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"/>
+ <string key="label">rootViewController</string>
+ <reference key="source" ref="117978783"/>
+ <reference key="destination" ref="312386433"/>
+ </object>
+ <int key="connectionID">26</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">gridViewDataSource</string>
+ <reference key="source" ref="198080756"/>
+ <reference key="destination" ref="943309135"/>
</object>
- <int key="connectionID">4</int>
+ <int key="connectionID">24</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">viewController</string>
- <reference key="source" ref="664661524"/>
+ <string key="label">gridViewDelegate</string>
+ <reference key="source" ref="198080756"/>
<reference key="destination" ref="943309135"/>
</object>
- <int key="connectionID">11</int>
+ <int key="connectionID">25</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"/>
+ <string key="label">gridViewDataSource</string>
+ <reference key="source" ref="538359114"/>
+ <reference key="destination" ref="684696339"/>
</object>
- <int key="connectionID">14</int>
+ <int key="connectionID">31</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">gridViewDelegate</string>
+ <reference key="source" ref="538359114"/>
+ <reference key="destination" ref="684696339"/>
+ </object>
+ <int key="connectionID">32</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -97,7 +189,9 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
- <reference key="object" ref="0"/>
+ <object class="NSArray" key="object" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@@ -108,25 +202,73 @@
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
- <int key="objectID">3</int>
- <reference key="object" ref="664661524"/>
+ <int key="objectID">-2</int>
+ <reference key="object" ref="427554174"/>
<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"/>
+ <int key="objectID">12</int>
+ <reference key="object" ref="117978783"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">16</int>
+ <reference key="object" ref="312386433"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="986298735"/>
+ <reference ref="684696339"/>
+ <reference ref="943309135"/>
+ </object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
+ <int key="objectID">17</int>
+ <reference key="object" ref="986298735"/>
+ <reference key="parent" ref="312386433"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">19</int>
+ <reference key="object" ref="684696339"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="483949957"/>
+ <reference ref="538359114"/>
+ </object>
+ <reference key="parent" ref="312386433"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">20</int>
+ <reference key="object" ref="483949957"/>
+ <reference key="parent" ref="684696339"/>
+ </object>
+ <object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="943309135"/>
- <reference key="parent" ref="0"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="2203468"/>
+ <reference ref="198080756"/>
+ </object>
+ <reference key="parent" ref="312386433"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">12</int>
- <reference key="object" ref="117978783"/>
- <reference key="parent" ref="0"/>
+ <int key="objectID">22</int>
+ <reference key="object" ref="2203468"/>
+ <reference key="parent" ref="943309135"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">23</int>
+ <reference key="object" ref="198080756"/>
+ <reference key="parent" ref="943309135"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">30</int>
+ <reference key="object" ref="538359114"/>
+ <reference key="parent" ref="684696339"/>
</object>
</object>
</object>
@@ -135,310 +277,75 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
+ <string>-1.IBPluginDependency</string>
<string>-2.CustomClassName</string>
+ <string>-2.IBPluginDependency</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">
+ <string>16.IBPluginDependency</string>
+ <string>17.IBPluginDependency</string>
+ <string>19.CustomClassName</string>
+ <string>19.IBPluginDependency</string>
+ <string>20.IBPluginDependency</string>
+ <string>22.IBPluginDependency</string>
+ <string>23.CustomClassName</string>
+ <string>23.IBPluginDependency</string>
+ <string>30.CustomClassName</string>
+ <string>30.IBPluginDependency</string>
+ </object>
+ <object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>UIResponder</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</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>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>GridViewPerformanceViewController</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>OHGridView</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>OHGridView</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>
+ <reference key="dict.values" ref="0"/>
</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>
+ <reference key="dict.values" ref="0"/>
</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>
+ <int key="maxID">32</int>
</object>
+ <object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <real value="1024" key="NS.object.0"/>
+ </object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="1024" key="NS.object.0"/>
+ <real value="1296" 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>
+ <string key="IBCocoaTouchPluginVersion">1498</string>
</data>
</archive>
View
10 GridViewExample/main.m
@@ -8,15 +8,9 @@
#import <UIKit/UIKit.h>
-int main(int argc, char *argv[]) {
-#if ARC_ENABLED
+int main(int argc, char *argv[])
+{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, nil);
}
-#else
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- int retVal = UIApplicationMain(argc, argv, nil, nil);
- [pool release];
- return retVal;
-#endif
}
View
15 OHGridView/OHGridView.m
@@ -114,13 +114,20 @@ -(void)dealloc
-(void)layoutSubviews
{
const CGFloat kLabelHeight = 21;
+
CGRect r = CGRectInset(self.bounds,5,5);
- r.size.height -= kLabelHeight;
+ if (self.textLabel.text)
+ {
+ r.size.height -= kLabelHeight;
+ }
self.imageView.frame = r;
r = CGRectInset(self.bounds,5,5);
- r.size.height = kLabelHeight;
- r.origin.y = CGRectGetMaxY(self.imageView.frame);
+ if (self.imageView.image)
+ {
+ r.size.height = kLabelHeight;
+ r.origin.y = CGRectGetMaxY(self.imageView.frame);
+ }
self.textLabel.frame = r;
self.backgroundView.frame = self.bounds;
@@ -457,8 +464,8 @@ -(void)layoutSubviews
cell = [self.gridViewDataSource OHGridView:self cellAtIndexPath:path];
cell.indexPath = path;
cell.selected = (path == self.indexPathForSelectedCell);
+ [self insertSubview:cell atIndex:self.visibleCells.count];
[self.visibleCells addObject:cell];
- [self insertSubview:cell atIndex:itemIndex];
}
cell.frame = CGRectInset( CGRectMake(col*w, row*self.rowHeight,w,self.rowHeight) , self.marginWidth, self.marginWidth);
if ([self.gridViewDelegate respondsToSelector:@selector(OHGridView:willDisplayCell:forIndexPath:)])
View
4 OHGridView/OHGridView.xcodeproj/project.pbxproj
@@ -148,8 +148,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- IPHONEOS_DEPLOYMENT_TARGET = 3.2;
SDKROOT = iphoneos;
};
name = Debug;
@@ -160,8 +158,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = YES;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- IPHONEOS_DEPLOYMENT_TARGET = 3.2;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};

0 comments on commit 372615d

Please sign in to comment.
Something went wrong with that request. Please try again.