Permalink
Browse files

Prevent setting of SSCollectionView's internal UITableView private pr…

…operties
  • Loading branch information...
1 parent 20542be commit 84228535b15e7f5e150b17fd69628abe927dd712 @soffes soffes committed Oct 17, 2011
View
8 SSToolkit.xcodeproj/project.pbxproj
@@ -17,6 +17,8 @@
B21D2E00121F2FE500161E66 /* SSDrawingUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = B21D2DFF121F2FE500161E66 /* SSDrawingUtilities.m */; };
B227D2EA124931590078A059 /* NSDictionary+SSToolkitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = B227D2E8124931590078A059 /* NSDictionary+SSToolkitAdditions.h */; };
B227D2EB124931590078A059 /* NSDictionary+SSToolkitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = B227D2E9124931590078A059 /* NSDictionary+SSToolkitAdditions.m */; };
+ B229B468144CE2F500F71626 /* SSCollectionViewTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = B229B466144CE2F500F71626 /* SSCollectionViewTableView.h */; };
+ B229B469144CE2F500F71626 /* SSCollectionViewTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = B229B467144CE2F500F71626 /* SSCollectionViewTableView.m */; };
B23910571357DC7D00ADE21B /* GHUnitIOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B23910551357DC7D00ADE21B /* GHUnitIOS.framework */; };
B23910601357DCF700ADE21B /* libSSToolkit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AAC07E0554694100DB518D /* libSSToolkit.a */; };
B23910621357DCF700ADE21B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B23910611357DCF700ADE21B /* CoreGraphics.framework */; };
@@ -152,6 +154,8 @@
B21D2DFF121F2FE500161E66 /* SSDrawingUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSDrawingUtilities.m; sourceTree = "<group>"; };
B227D2E8124931590078A059 /* NSDictionary+SSToolkitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+SSToolkitAdditions.h"; sourceTree = "<group>"; };
B227D2E9124931590078A059 /* NSDictionary+SSToolkitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+SSToolkitAdditions.m"; sourceTree = "<group>"; };
+ B229B466144CE2F500F71626 /* SSCollectionViewTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSCollectionViewTableView.h; sourceTree = "<group>"; };
+ B229B467144CE2F500F71626 /* SSCollectionViewTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSCollectionViewTableView.m; sourceTree = "<group>"; };
B239101D1357DC3E00ADE21B /* SSToolkitTests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SSToolkitTests.app; sourceTree = BUILT_PRODUCTS_DIR; };
B23910551357DC7D00ADE21B /* GHUnitIOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GHUnitIOS.framework; sourceTree = "<group>"; };
B23910561357DC7D00ADE21B /* SSToolkitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SSToolkitTests-Info.plist"; sourceTree = "<group>"; };
@@ -547,6 +551,8 @@
B2D8829313328EEF006B3F55 /* SSHUDWindow.m */,
B279539C12FC6C6F00FFE28D /* SSRatingPickerScrollView.h */,
B279539D12FC6C6F00FFE28D /* SSRatingPickerScrollView.m */,
+ B229B466144CE2F500F71626 /* SSCollectionViewTableView.h */,
+ B229B467144CE2F500F71626 /* SSCollectionViewTableView.m */,
);
name = Private;
sourceTree = "<group>";
@@ -622,6 +628,7 @@
B25C8E611394327000DE7BFF /* SSCollectionViewExtremityTableViewCell.h in Headers */,
B2136B3C13ABCC0C00FEBCFD /* SSBorderedView.h in Headers */,
B280E25F13BA76A300FCDA5C /* SSAnimatedImageView.h in Headers */,
+ B229B468144CE2F500F71626 /* SSCollectionViewTableView.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -773,6 +780,7 @@
B25C8E601394327000DE7BFF /* SSCollectionViewExtremityTableViewCell.m in Sources */,
B2136B3D13ABCC0C00FEBCFD /* SSBorderedView.m in Sources */,
B280E25D13BA769C00FCDA5C /* SSAnimatedImageView.m in Sources */,
+ B229B469144CE2F500F71626 /* SSCollectionViewTableView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
9 SSToolkit/SSCollectionView.m
@@ -12,6 +12,7 @@
#import "SSCollectionViewItemInternal.h"
#import "SSCollectionViewItemTableViewCell.h"
#import "SSCollectionViewExtremityTableViewCell.h"
+#import "SSCollectionViewTableView.h"
#import "SSDrawingUtilities.h"
#import "UIView+SSToolkitAdditions.h"
@@ -54,7 +55,7 @@ @implementation SSCollectionView {
NSMutableDictionary *_reuseableItems;
NSMutableDictionary *_sectionCache;
- UITableView *_tableView;
+ SSCollectionViewTableView *_tableView;
}
#pragma mark - Accessors
@@ -352,11 +353,11 @@ - (void)_initialize {
_reuseableItems = [[NSMutableDictionary alloc] init];
_sectionCache = [[NSMutableDictionary alloc] init];
- _tableView = [[UITableView alloc] initWithFrame:self.bounds];
+ _tableView = [[SSCollectionViewTableView alloc] initWithFrame:self.bounds];
_tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- _tableView.dataSource = self;
- _tableView.delegate = self;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+ [_tableView _setDataSource:self];
+ [_tableView _setDelegate:self];
[self addSubview:_tableView];
}
View
16 SSToolkit/SSCollectionViewTableView.h
@@ -0,0 +1,16 @@
+//
+// SSCollectionViewTableView.h
+// SSToolkit
+//
+// Created by Sam Soffes on 10/17/11.
+// Copyright (c) 2011 Sam Soffes. All rights reserved.
+//
+
+@class SSCollectionView;
+
+@interface SSCollectionViewTableView : UITableView
+
+- (void)_setDelegate:(SSCollectionView *)aCollectionView;
+- (void)_setDataSource:(SSCollectionView *)aCollectionView;
+
+@end
View
33 SSToolkit/SSCollectionViewTableView.m
@@ -0,0 +1,33 @@
+//
+// SSCollectionViewTableView.m
+// SSToolkit
+//
+// Created by Sam Soffes on 10/17/11.
+// Copyright (c) 2011 Sam Soffes. All rights reserved.
+//
+
+#import "SSCollectionViewTableView.h"
+
+@implementation SSCollectionViewTableView
+
+- (void)setDelegate:(id<UITableViewDelegate>)delegate {
+ // Do nothing.
+}
+
+
+- (void)setDataSource:(id<UITableViewDataSource>)dataSource {
+ // Do nothing.
+}
+
+
+- (void)_setDelegate:(SSCollectionView *)aCollectionView {
+ [super setDelegate:(id<UITableViewDelegate>)aCollectionView];
+}
+
+
+- (void)_setDataSource:(SSCollectionView *)aCollectionView {
+ [super setDataSource:(id<UITableViewDataSource>)aCollectionView];
+}
+
+
+@end

0 comments on commit 8422853

Please sign in to comment.