From 652e92aab3ee56e4b489ee372fbaac3e59be11cb Mon Sep 17 00:00:00 2001 From: Mark Aufflick Date: Wed, 5 Jan 2011 14:32:23 +1100 Subject: [PATCH] another place scrollbars can be removed --- DTGridView Project/DTGridView.xcodeproj/project.pbxproj | 4 ++-- DTGridView.m | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/DTGridView Project/DTGridView.xcodeproj/project.pbxproj b/DTGridView Project/DTGridView.xcodeproj/project.pbxproj index f6f3d3f..d4bfad4 100644 --- a/DTGridView Project/DTGridView.xcodeproj/project.pbxproj +++ b/DTGridView Project/DTGridView.xcodeproj/project.pbxproj @@ -136,8 +136,8 @@ 24388EAB12B8D4F800848476 /* DTSnapGridView */, ); name = DTGridView; - path = /Users/danielctull/Dropbox/Programs/Cocoa/Frameworks/DTGridView; - sourceTree = ""; + path = ..; + sourceTree = SOURCE_ROOT; }; 24388EA812B8D4F800848476 /* DTInfiniteGridView */ = { isa = PBXGroup; diff --git a/DTGridView.m b/DTGridView.m index ac045b6..5b84759 100644 --- a/DTGridView.m +++ b/DTGridView.m @@ -427,9 +427,14 @@ - (void)loadData { NSSet *gridCellsSet = [NSSet setWithArray:self.gridCells]; NSArray *subviewsCopy = [self.subviews copy]; - for (DTGridViewCell *cell in subviewsCopy) { - if (![gridCellsSet member:cell]) + for (UIView *cell in subviewsCopy) { + if ( + [cell isKindOfClass:[DTGridViewCell class]] && + ![gridCellsSet member:cell] + ) + { [cell removeFromSuperview]; + } } [subviewsCopy release];