Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added better support for scaling images to fit tiles

  • Loading branch information...
commit 7beff2dc3f49184bad6eb9fcb279e4c071d85b6e 1 parent a9fa874
Cameron Hunt authored
75 CHGridTestApp/CHGridTestApp.xcodeproj/camh.mode1v3
View
@@ -266,15 +266,12 @@
<string>29B97314FDCFA39411CA2CEA</string>
<string>080E96DDFE201D6D7F000001</string>
<string>B1E79E12113CEFB400253EE0</string>
- <string>B1E79E13113CEFC200253EE0</string>
- <string>29B97317FDCFA39411CA2CEA</string>
<string>1C37FABC05509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>17</integer>
- <integer>15</integer>
+ <integer>8</integer>
<integer>6</integer>
<integer>1</integer>
<integer>0</integer>
@@ -300,7 +297,7 @@
<real>259</real>
</array>
<key>RubberWindowFrame</key>
- <string>134 135 960 1043 0 0 1920 1178 </string>
+ <string>69 135 1212 1043 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -318,7 +315,7 @@
<key>PBXProjectModuleGUID</key>
<string>1CE0B20306471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
- <string>CHGridLayout.m</string>
+ <string>README.markdown</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
@@ -326,11 +323,11 @@
<key>PBXProjectModuleGUID</key>
<string>1CE0B20406471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
- <string>CHGridLayout.m</string>
+ <string>README.markdown</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>B1E7A124113CFFDE00253EE0</string>
+ <string>B1E7A170113D02B600253EE0</string>
<key>history</key>
<array>
<string>B1E79E44113CF25400253EE0</string>
@@ -339,9 +336,13 @@
<string>B1E7A0F2113CF8F900253EE0</string>
<string>B1E7A0F9113CF92300253EE0</string>
<string>B1E7A107113CFA6400253EE0</string>
- <string>B1E7A111113CFCD300253EE0</string>
- <string>B1E7A120113CFF7100253EE0</string>
- <string>B1E7A121113CFF7100253EE0</string>
+ <string>B1E7A15F113D01DF00253EE0</string>
+ <string>B1E7A160113D01DF00253EE0</string>
+ <string>B1E7A168113D026E00253EE0</string>
+ <string>B1E7A16D113D02B600253EE0</string>
+ <string>B1E7A16E113D02B600253EE0</string>
+ <string>B1E7A16F113D02B600253EE0</string>
+ <string>B1E7A167113D026E00253EE0</string>
</array>
</dict>
<key>SplitCount</key>
@@ -353,9 +354,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {679, 997}}</string>
+ <string>{{0, 0}, {931, 997}}</string>
<key>RubberWindowFrame</key>
- <string>134 135 960 1043 0 0 1920 1178 </string>
+ <string>69 135 1212 1043 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
@@ -373,9 +374,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 1002}, {679, 0}}</string>
+ <string>{{0, 1002}, {931, 0}}</string>
<key>RubberWindowFrame</key>
- <string>134 135 960 1043 0 0 1920 1178 </string>
+ <string>69 135 1212 1043 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -384,7 +385,7 @@
</dict>
</array>
<key>Proportion</key>
- <string>679pt</string>
+ <string>931pt</string>
</dict>
</array>
<key>Name</key>
@@ -399,9 +400,9 @@
</array>
<key>TableOfContents</key>
<array>
- <string>B1E79E09113CEF8400253EE0</string>
+ <string>B1E7A145113D018400253EE0</string>
<string>1CE0B1FE06471DED0097A5F4</string>
- <string>B1E79E0A113CEF8400253EE0</string>
+ <string>B1E7A146113D018400253EE0</string>
<string>1CE0B20306471E060097A5F4</string>
<string>1CE0B20506471E060097A5F4</string>
</array>
@@ -539,15 +540,15 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>B1E7A0E8113CF7C600253EE0</string>
- <string>B1E7A0E6113CF77500253EE0</string>
+ <string>B1E7A16B113D026E00253EE0</string>
+ <string>B1E7A16C113D026E00253EE0</string>
+ <string>1C78EAAD065D492600B07095</string>
<string>1CD10A99069EF8BA00B06720</string>
<string>B1E79E0C113CEF8400253EE0</string>
- <string>1C78EAAD065D492600B07095</string>
<string>/Users/camh/Desktop/Dropbox/Code/CHGridView/CHGridTestApp/CHGridTestApp.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>134 135 960 1043 0 0 1920 1178 </string>
+ <string>69 135 1212 1043 0 0 1920 1178 </string>
<key>WindowToolsV3</key>
<array>
<dict>
@@ -624,7 +625,7 @@
<key>TableOfContents</key>
<array>
<string>B1E79E0C113CEF8400253EE0</string>
- <string>B1E79E0D113CEF8400253EE0</string>
+ <string>B1E7A147113D018400253EE0</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
@@ -668,8 +669,8 @@
<string>yes</string>
<key>sizes</key>
<array>
- <string>{{0, 0}, {316, 185}}</string>
- <string>{{316, 0}, {378, 185}}</string>
+ <string>{{0, 0}, {316, 194}}</string>
+ <string>{{316, 0}, {378, 194}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
@@ -684,8 +685,8 @@
<string>yes</string>
<key>sizes</key>
<array>
- <string>{{0, 0}, {694, 185}}</string>
- <string>{{0, 185}, {694, 196}}</string>
+ <string>{{0, 0}, {694, 194}}</string>
+ <string>{{0, 194}, {694, 187}}</string>
</array>
</dict>
</dict>
@@ -718,7 +719,7 @@
<real>148</real>
</array>
<key>Frame</key>
- <string>{{316, 0}, {378, 185}}</string>
+ <string>{{316, 0}, {378, 194}}</string>
<key>RubberWindowFrame</key>
<string>94 733 694 422 0 0 1920 1178 </string>
</dict>
@@ -746,13 +747,13 @@
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
- <string>B1E79E47113CF25400253EE0</string>
+ <string>B1E7A148113D018400253EE0</string>
<string>1C162984064C10D400B95A72</string>
- <string>B1E79E48113CF25400253EE0</string>
- <string>B1E79E49113CF25400253EE0</string>
- <string>B1E79E4A113CF25400253EE0</string>
- <string>B1E79E4B113CF25400253EE0</string>
- <string>B1E79E4C113CF25400253EE0</string>
+ <string>B1E7A149113D018400253EE0</string>
+ <string>B1E7A14A113D018400253EE0</string>
+ <string>B1E7A14B113D018400253EE0</string>
+ <string>B1E7A14C113D018400253EE0</string>
+ <string>B1E7A14D113D018400253EE0</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
@@ -879,8 +880,6 @@
<key>Dock</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
@@ -916,7 +915,7 @@
<key>TableOfContents</key>
<array>
<string>1C78EAAD065D492600B07095</string>
- <string>B1E79E4D113CF25400253EE0</string>
+ <string>B1E7A14E113D018400253EE0</string>
<string>1C78EAAC065D492600B07095</string>
</array>
<key>ToolbarConfiguration</key>
@@ -926,7 +925,7 @@
<key>WindowToolGUID</key>
<string>1C78EAAD065D492600B07095</string>
<key>WindowToolIsVisible</key>
- <true/>
+ <false/>
</dict>
<dict>
<key>Identifier</key>
284 CHGridTestApp/CHGridTestApp.xcodeproj/camh.pbxuser
View
@@ -38,9 +38,9 @@
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
- 440,
+ 692,
20,
- 48.16259765625,
+ 48,
43,
43,
20,
@@ -55,20 +55,39 @@
PBXFileDataSource_Target_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 289206145;
- PBXWorkspaceStateSaveDate = 289206145;
+ PBXPerProjectTemplateStateSaveDate = 289210566;
+ PBXWorkspaceStateSaveDate = 289210566;
};
perUserProjectItems = {
- B1E79E44113CF25400253EE0 /* PBXTextBookmark */ = B1E79E44113CF25400253EE0 /* PBXTextBookmark */;
- B1E79E57113CF29500253EE0 /* PBXTextBookmark */ = B1E79E57113CF29500253EE0 /* PBXTextBookmark */;
- B1E7A0A8113CF55F00253EE0 /* PlistBookmark */ = B1E7A0A8113CF55F00253EE0 /* PlistBookmark */;
- B1E7A0F2113CF8F900253EE0 /* PBXBookmark */ = B1E7A0F2113CF8F900253EE0 /* PBXBookmark */;
- B1E7A0F9113CF92300253EE0 /* PBXBookmark */ = B1E7A0F9113CF92300253EE0 /* PBXBookmark */;
- B1E7A107113CFA6400253EE0 /* PBXTextBookmark */ = B1E7A107113CFA6400253EE0 /* PBXTextBookmark */;
- B1E7A111113CFCD300253EE0 /* PBXTextBookmark */ = B1E7A111113CFCD300253EE0 /* PBXTextBookmark */;
- B1E7A120113CFF7100253EE0 /* PBXTextBookmark */ = B1E7A120113CFF7100253EE0 /* PBXTextBookmark */;
- B1E7A121113CFF7100253EE0 /* PBXTextBookmark */ = B1E7A121113CFF7100253EE0 /* PBXTextBookmark */;
- B1E7A124113CFFDE00253EE0 /* PBXTextBookmark */ = B1E7A124113CFFDE00253EE0 /* PBXTextBookmark */;
+ B1E79E44113CF25400253EE0 = B1E79E44113CF25400253EE0 /* PBXTextBookmark */;
+ B1E79E57113CF29500253EE0 = B1E79E57113CF29500253EE0 /* PBXTextBookmark */;
+ B1E7A0A8113CF55F00253EE0 = B1E7A0A8113CF55F00253EE0 /* PlistBookmark */;
+ B1E7A0F2113CF8F900253EE0 = B1E7A0F2113CF8F900253EE0 /* PBXBookmark */;
+ B1E7A0F9113CF92300253EE0 = B1E7A0F9113CF92300253EE0 /* PBXBookmark */;
+ B1E7A107113CFA6400253EE0 = B1E7A107113CFA6400253EE0 /* PBXTextBookmark */;
+ B1E7A111113CFCD300253EE0 = B1E7A111113CFCD300253EE0 /* PBXTextBookmark */;
+ B1E7A120113CFF7100253EE0 = B1E7A120113CFF7100253EE0 /* PBXTextBookmark */;
+ B1E7A121113CFF7100253EE0 = B1E7A121113CFF7100253EE0 /* PBXTextBookmark */;
+ B1E7A124113CFFDE00253EE0 = B1E7A124113CFFDE00253EE0 /* PBXTextBookmark */;
+ B1E7A142113D018400253EE0 /* PBXTextBookmark */ = B1E7A142113D018400253EE0 /* PBXTextBookmark */;
+ B1E7A143113D018400253EE0 /* PBXTextBookmark */ = B1E7A143113D018400253EE0 /* PBXTextBookmark */;
+ B1E7A144113D018400253EE0 /* PBXTextBookmark */ = B1E7A144113D018400253EE0 /* PBXTextBookmark */;
+ B1E7A151113D01AA00253EE0 /* PBXTextBookmark */ = B1E7A151113D01AA00253EE0 /* PBXTextBookmark */;
+ B1E7A154113D01C400253EE0 /* PBXTextBookmark */ = B1E7A154113D01C400253EE0 /* PBXTextBookmark */;
+ B1E7A155113D01C400253EE0 /* PBXTextBookmark */ = B1E7A155113D01C400253EE0 /* PBXTextBookmark */;
+ B1E7A156113D01C400253EE0 /* PBXTextBookmark */ = B1E7A156113D01C400253EE0 /* PBXTextBookmark */;
+ B1E7A15F113D01DF00253EE0 /* PBXTextBookmark */ = B1E7A15F113D01DF00253EE0 /* PBXTextBookmark */;
+ B1E7A160113D01DF00253EE0 /* PBXTextBookmark */ = B1E7A160113D01DF00253EE0 /* PBXTextBookmark */;
+ B1E7A161113D01DF00253EE0 /* PBXTextBookmark */ = B1E7A161113D01DF00253EE0 /* PBXTextBookmark */;
+ B1E7A166113D026E00253EE0 /* PBXTextBookmark */ = B1E7A166113D026E00253EE0 /* PBXTextBookmark */;
+ B1E7A167113D026E00253EE0 /* PBXTextBookmark */ = B1E7A167113D026E00253EE0 /* PBXTextBookmark */;
+ B1E7A168113D026E00253EE0 /* PBXTextBookmark */ = B1E7A168113D026E00253EE0 /* PBXTextBookmark */;
+ B1E7A169113D026E00253EE0 /* PBXTextBookmark */ = B1E7A169113D026E00253EE0 /* PBXTextBookmark */;
+ B1E7A16A113D026E00253EE0 /* PBXTextBookmark */ = B1E7A16A113D026E00253EE0 /* PBXTextBookmark */;
+ B1E7A16D113D02B600253EE0 /* PBXTextBookmark */ = B1E7A16D113D02B600253EE0 /* PBXTextBookmark */;
+ B1E7A16E113D02B600253EE0 /* PBXTextBookmark */ = B1E7A16E113D02B600253EE0 /* PBXTextBookmark */;
+ B1E7A16F113D02B600253EE0 /* PBXTextBookmark */ = B1E7A16F113D02B600253EE0 /* PBXTextBookmark */;
+ B1E7A170113D02B600253EE0 /* PBXTextBookmark */ = B1E7A170113D02B600253EE0 /* PBXTextBookmark */;
};
sourceControlManager = B1E79E0E113CEF8400253EE0 /* Source Control */;
userBuildSettings = {
@@ -127,9 +146,9 @@
};
B1E79E15113CEFC200253EE0 /* CHGridLayout.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {618, 3575}}";
- sepNavSelRange = "{816, 0}";
- sepNavVisRange = "{0, 1752}";
+ sepNavIntBoundsRect = "{{0, 0}, {870, 3510}}";
+ sepNavSelRange = "{991, 0}";
+ sepNavVisRange = "{0, 1844}";
};
};
B1E79E1A113CEFC200253EE0 /* CHGridView.h */ = {
@@ -141,32 +160,46 @@
};
B1E79E1B113CEFC200253EE0 /* CHGridView.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {618, 6318}}";
- sepNavSelRange = "{1701, 0}";
- sepNavVisRange = "{0, 2115}";
+ sepNavIntBoundsRect = "{{0, 0}, {870, 6292}}";
+ sepNavSelRange = "{839, 0}";
+ sepNavVisRange = "{0, 2160}";
};
};
B1E79E1C113CEFC200253EE0 /* CHImageTileView.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {724, 771}}";
+ sepNavIntBoundsRect = "{{0, 0}, {870, 980}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 490}";
};
};
+ B1E79E1D113CEFC200253EE0 /* CHImageTileView.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {870, 1300}}";
+ sepNavSelRange = "{553, 0}";
+ sepNavVisRange = "{0, 2129}";
+ };
+ };
B1E79E1E113CEFC200253EE0 /* CHSectionHeaderView.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {618, 957}}";
+ sepNavIntBoundsRect = "{{0, 0}, {870, 980}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 584}";
};
};
B1E79E20113CEFC200253EE0 /* CHTileView.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {691, 980}}";
+ sepNavIntBoundsRect = "{{0, 0}, {870, 980}}";
sepNavSelRange = "{166, 0}";
sepNavVisRange = "{0, 1393}";
};
};
+ B1E79E21113CEFC200253EE0 /* CHTileView.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {870, 1326}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 2141}";
+ };
+ };
B1E79E3B113CF1D200253EE0 /* CHGridViewController.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {618, 980}}";
@@ -176,9 +209,9 @@
};
B1E79E3C113CF1D200253EE0 /* CHGridViewController.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {618, 1768}}";
- sepNavSelRange = "{2318, 0}";
- sepNavVisRange = "{1343, 2085}";
+ sepNavIntBoundsRect = "{{0, 0}, {870, 1768}}";
+ sepNavSelRange = "{1154, 0}";
+ sepNavVisRange = "{606, 1899}";
};
};
B1E79E44113CF25400253EE0 /* PBXTextBookmark */ = {
@@ -210,7 +243,7 @@
);
name = "/Users/camh/Desktop/Dropbox/Code/CHGridView/CHGridTestApp/CHGridTestApp-Info.plist";
rLen = 0;
- rLoc = 9223372036854775807;
+ rLoc = 9223372036854775808;
};
B1E7A0F2113CF8F900253EE0 /* PBXBookmark */ = {
isa = PBXBookmark;
@@ -270,4 +303,201 @@
vrLen = 1752;
vrLoc = 0;
};
+ B1E7A142113D018400253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E3C113CF1D200253EE0 /* CHGridViewController.m */;
+ name = "CHGridViewController.m: 111";
+ rLen = 0;
+ rLoc = 2990;
+ rType = 0;
+ vrLen = 2272;
+ vrLoc = 1189;
+ };
+ B1E7A143113D018400253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1D113CEFC200253EE0 /* CHImageTileView.m */;
+ name = "CHImageTileView.m: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 2153;
+ vrLoc = 0;
+ };
+ B1E7A144113D018400253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1D113CEFC200253EE0 /* CHImageTileView.m */;
+ name = "CHImageTileView.m: 57";
+ rLen = 0;
+ rLoc = 1422;
+ rType = 0;
+ vrLen = 1987;
+ vrLoc = 0;
+ };
+ B1E7A151113D01AA00253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1D113CEFC200253EE0 /* CHImageTileView.m */;
+ name = "CHImageTileView.m: 42";
+ rLen = 0;
+ rLoc = 932;
+ rType = 0;
+ vrLen = 1987;
+ vrLoc = 0;
+ };
+ B1E7A154113D01C400253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1D113CEFC200253EE0 /* CHImageTileView.m */;
+ name = "CHImageTileView.m: 42";
+ rLen = 0;
+ rLoc = 932;
+ rType = 0;
+ vrLen = 1987;
+ vrLoc = 0;
+ };
+ B1E7A155113D01C400253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1B113CEFC200253EE0 /* CHGridView.m */;
+ name = "CHGridView.m: 26";
+ rLen = 0;
+ rLoc = 839;
+ rType = 0;
+ vrLen = 2115;
+ vrLoc = 0;
+ };
+ B1E7A156113D01C400253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E3C113CF1D200253EE0 /* CHGridViewController.m */;
+ name = "CHGridViewController.m: 51";
+ rLen = 0;
+ rLoc = 1154;
+ rType = 0;
+ vrLen = 1823;
+ vrLoc = 606;
+ };
+ B1E7A15F113D01DF00253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E3C113CF1D200253EE0 /* CHGridViewController.m */;
+ name = "CHGridViewController.m: 51";
+ rLen = 0;
+ rLoc = 1154;
+ rType = 0;
+ vrLen = 1899;
+ vrLoc = 606;
+ };
+ B1E7A160113D01DF00253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1E113CEFC200253EE0 /* CHSectionHeaderView.h */;
+ name = "CHSectionHeaderView.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 584;
+ vrLoc = 0;
+ };
+ B1E7A161113D01DF00253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1D113CEFC200253EE0 /* CHImageTileView.m */;
+ name = "CHImageTileView.m: 46";
+ rLen = 0;
+ rLoc = 1066;
+ rType = 0;
+ vrLen = 2128;
+ vrLoc = 0;
+ };
+ B1E7A163113D025F00253EE0 /* README.markdown */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {870, 1235}}";
+ sepNavSelRange = "{2841, 0}";
+ sepNavVisRange = "{964, 4395}";
+ };
+ };
+ B1E7A166113D026E00253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1B113CEFC200253EE0 /* CHGridView.m */;
+ name = "CHGridView.m: 26";
+ rLen = 0;
+ rLoc = 839;
+ rType = 0;
+ vrLen = 2160;
+ vrLoc = 0;
+ };
+ B1E7A167113D026E00253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E7A163113D025F00253EE0 /* README.markdown */;
+ name = "README.markdown: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 4595;
+ vrLoc = 0;
+ };
+ B1E7A168113D026E00253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E20113CEFC200253EE0 /* CHTileView.h */;
+ name = "CHTileView.h: 7";
+ rLen = 0;
+ rLoc = 166;
+ rType = 0;
+ vrLen = 1393;
+ vrLoc = 0;
+ };
+ B1E7A169113D026E00253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1D113CEFC200253EE0 /* CHImageTileView.m */;
+ name = "CHImageTileView.m: 23";
+ rLen = 0;
+ rLoc = 556;
+ rType = 0;
+ vrLen = 2128;
+ vrLoc = 0;
+ };
+ B1E7A16A113D026E00253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1D113CEFC200253EE0 /* CHImageTileView.m */;
+ name = "CHImageTileView.m: 22";
+ rLen = 0;
+ rLoc = 553;
+ rType = 0;
+ vrLen = 2129;
+ vrLoc = 0;
+ };
+ B1E7A16D113D02B600253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1D113CEFC200253EE0 /* CHImageTileView.m */;
+ name = "CHImageTileView.m: 22";
+ rLen = 0;
+ rLoc = 553;
+ rType = 0;
+ vrLen = 2129;
+ vrLoc = 0;
+ };
+ B1E7A16E113D02B600253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E21113CEFC200253EE0 /* CHTileView.m */;
+ name = "CHTileView.m: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 2141;
+ vrLoc = 0;
+ };
+ B1E7A16F113D02B600253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E79E1B113CEFC200253EE0 /* CHGridView.m */;
+ name = "CHGridView.m: 26";
+ rLen = 0;
+ rLoc = 839;
+ rType = 0;
+ vrLen = 2160;
+ vrLoc = 0;
+ };
+ B1E7A170113D02B600253EE0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = B1E7A163113D025F00253EE0 /* README.markdown */;
+ name = "README.markdown: 33";
+ rLen = 0;
+ rLoc = 2841;
+ rType = 0;
+ vrLen = 4395;
+ vrLoc = 964;
+ };
}
8 CHGridTestApp/CHGridTestApp.xcodeproj/project.pbxproj
View
@@ -315,6 +315,8 @@
B1E7A0A5113CF4D200253EE0 /* 97.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B1E79F7F113CF4D100253EE0 /* 97.jpg */; };
B1E7A0A6113CF4D200253EE0 /* 98.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B1E79F80113CF4D100253EE0 /* 98.jpg */; };
B1E7A0A7113CF4D200253EE0 /* 99.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B1E79F81113CF4D100253EE0 /* 99.jpg */; };
+ B1E7A164113D025F00253EE0 /* LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = B1E7A162113D025F00253EE0 /* LICENSE.txt */; };
+ B1E7A165113D025F00253EE0 /* README.markdown in Resources */ = {isa = PBXBuildFile; fileRef = B1E7A163113D025F00253EE0 /* README.markdown */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -638,6 +640,8 @@
B1E79F7F113CF4D100253EE0 /* 97.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = 97.jpg; path = flickrimg/97.jpg; sourceTree = SOURCE_ROOT; };
B1E79F80113CF4D100253EE0 /* 98.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = 98.jpg; path = flickrimg/98.jpg; sourceTree = SOURCE_ROOT; };
B1E79F81113CF4D100253EE0 /* 99.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = 99.jpg; path = flickrimg/99.jpg; sourceTree = SOURCE_ROOT; };
+ B1E7A162113D025F00253EE0 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE.txt; path = ../LICENSE.txt; sourceTree = SOURCE_ROOT; };
+ B1E7A163113D025F00253EE0 /* README.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.markdown; path = ../README.markdown; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -718,6 +722,8 @@
B1E79E12113CEFB400253EE0 /* CHGridView */ = {
isa = PBXGroup;
children = (
+ B1E7A162113D025F00253EE0 /* LICENSE.txt */,
+ B1E7A163113D025F00253EE0 /* README.markdown */,
B1E79E1A113CEFC200253EE0 /* CHGridView.h */,
B1E79E1B113CEFC200253EE0 /* CHGridView.m */,
B1E79E20113CEFC200253EE0 /* CHTileView.h */,
@@ -1383,6 +1389,8 @@
B1E7A0A5113CF4D200253EE0 /* 97.jpg in Resources */,
B1E7A0A6113CF4D200253EE0 /* 98.jpg in Resources */,
B1E7A0A7113CF4D200253EE0 /* 99.jpg in Resources */,
+ B1E7A164113D025F00253EE0 /* LICENSE.txt in Resources */,
+ B1E7A165113D025F00253EE0 /* README.markdown in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1  CHGridTestApp/Classes/CHGridViewController.m
View
@@ -108,6 +108,7 @@ - (CHTileView *)tileForIndexPath:(CHGridIndexPath)indexPath inGridView:(CHGridVi
tile = [[[CHImageTileView alloc] initWithFrame:CGRectZero reuseIdentifier:TileIndentifier] autorelease];
[tile setImage:[images objectAtIndex:indexPath.tileIndex]];
+ [tile setScalesImageToFit:YES];
return tile;
}
14 CHImageTileView.m
View
@@ -19,7 +19,7 @@ - (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseId{
if(image == nil)
image = [[UIImage alloc] init];
- scalesImageToFit = NO;
+ scalesImageToFit = YES;
}
return self;
}
@@ -39,12 +39,12 @@ - (void)drawContentRect:(CGRect)rect{
float topOffset = rect.origin.y;
if(scalesImageToFit){
- float maxSize = fmaxf(rect.size.width, rect.size.height);
+ float size = fmax(rect.size.width, rect.size.height);
- float widthScale = imageSize.width / maxSize;
- float heightScale = imageSize.height / maxSize;
+ float widthScale = imageSize.width / size;
+ float heightScale = imageSize.height / size;
- float scale = fminf(widthScale, heightScale);
+ float scale = fmin(widthScale, heightScale);
newWidth = imageSize.width / scale;
newHeight = imageSize.height / scale;
@@ -53,8 +53,8 @@ - (void)drawContentRect:(CGRect)rect{
newHeight = imageSize.height;
}
- if(rect.size.height < imageSize.height) topOffset += ceil((rect.size.height - imageSize.height) / 2);
- if(rect.size.width < imageSize.width) leftOffset += ceil((rect.size.width - imageSize.width) / 2);
+ if(rect.size.height > newHeight) topOffset += ceil((rect.size.height - imageSize.height) / 2);
+ if(rect.size.width > newWidth) leftOffset += ceil((rect.size.width - imageSize.width) / 2);
CGRect imageRect = CGRectMake(leftOffset, topOffset, newWidth, newHeight);
//[image drawInRect:imageRect];
3  README.markdown
View
@@ -26,7 +26,7 @@ NOTICE: **CHGridView is not production-level software yet. Don't use it in shipp
Exactly like UITableView. Just implement the two required data source methods: `numberOfTilesInSection` and `tileForIndexPath`. CHGridView assumes there is at least one section. The method `tileForIndexPath` works very much like UITableView; CHGridView reuses tiles like UITableView reuses cells. Call `dequeueReusableTileWithIdentifier` to get a reusable tile, if it's `nil`, `init` and `autorelease` a new tile and return it.
-There's two basic styles to use in GHGridView, one that resembles the Photos application, and one that mimics iPhoto and the iPad photo grid. The property that controls it is called `centerTilesInGrid`. Set it to `YES` for the iPhoto style.
+There's two basic styles to use in GHGridView, one that resembles the Photos application, and one that mimics iPhoto and the iPad photo grid. The property that controls it is called `centerTilesInGrid`. Set it to `YES` for the iPhoto style. If you want the iPhoto style, you need to make sure `rowHeight` is higher than your tallest image.
Row height, tiles per line, padding, section title height and shadow are all properties of CHGridView. These are not meant to change often like the data source and delegate methods. However, if you do change them, make sure to call `reloadData` to recalculate the layout.
@@ -43,7 +43,6 @@ CHGridView only loads visible tiles and section titles, plus four rows above and
CHGridView, like most scalable computer interfaces, makes trade-offs. It's currently optimized to for low memory usage, but requires more processor cyles. Performance is roughly the same if you use 3000 tiles or 200 tiles. Optimally CHGridView should be smart enough to switch this trade-off at some point (if < 400 tiles, for instance).
- CHTileView shadows are not transparent, they are rendered onto the same background color as CHGridView. It's possible to change it if you long for the scrolling performance of Android or Palm webOS.
-- CHImageTileView supports scaling images up/down to fit its frame (and preserves aspect ratio) but it's not fast enough to use. The property is called `scalesImageToFit` and you should never use it.
- Section headers are only transparent when they need to be, otherwise they are opaque. If you subclass CHSectionHeaderView, you'll need to check `[self isOpaque]` to compensate for transparency if needed.
###Roadmap (roughly in order):
Please sign in to comment.
Something went wrong with that request. Please try again.