Skip to content

Commit

Permalink
Merge branch 'master' of github.com:samsoffes/sstoolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
soffes committed Sep 16, 2011
2 parents b36fa46 + 5b6fc0b commit 5f403d5
Show file tree
Hide file tree
Showing 28 changed files with 596 additions and 66 deletions.
16 changes: 8 additions & 8 deletions SSToolkit.xcodeproj/project.pbxproj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; }; AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
B20AC0691267988600687143 /* SSTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B20AC0671267988600687143 /* SSTableViewController.h */; }; B20AC0691267988600687143 /* SSTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B20AC0671267988600687143 /* SSTableViewController.h */; };
B20AC06A1267988600687143 /* SSTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B20AC0681267988600687143 /* SSTableViewController.m */; }; B20AC06A1267988600687143 /* SSTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B20AC0681267988600687143 /* SSTableViewController.m */; };
B2136B3C13ABCC0C00FEBCFD /* SSBordererView.h in Headers */ = {isa = PBXBuildFile; fileRef = B2136B3A13ABCC0C00FEBCFD /* SSBordererView.h */; }; B2136B3C13ABCC0C00FEBCFD /* SSBorderedView.h in Headers */ = {isa = PBXBuildFile; fileRef = B2136B3A13ABCC0C00FEBCFD /* SSBorderedView.h */; };
B2136B3D13ABCC0C00FEBCFD /* SSBordererView.m in Sources */ = {isa = PBXBuildFile; fileRef = B2136B3B13ABCC0C00FEBCFD /* SSBordererView.m */; }; B2136B3D13ABCC0C00FEBCFD /* SSBorderedView.m in Sources */ = {isa = PBXBuildFile; fileRef = B2136B3B13ABCC0C00FEBCFD /* SSBorderedView.m */; };
B215045F10583A7300409ED4 /* SSToolkit_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = B215045E10583A7300409ED4 /* SSToolkit_Prefix.pch */; }; B215045F10583A7300409ED4 /* SSToolkit_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = B215045E10583A7300409ED4 /* SSToolkit_Prefix.pch */; };
B215051210583BBB00409ED4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B215051110583BBB00409ED4 /* UIKit.framework */; }; B215051210583BBB00409ED4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B215051110583BBB00409ED4 /* UIKit.framework */; };
B21D2E00121F2FE500161E66 /* SSDrawingUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = B21D2DFF121F2FE500161E66 /* SSDrawingUtilities.m */; }; B21D2E00121F2FE500161E66 /* SSDrawingUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = B21D2DFF121F2FE500161E66 /* SSDrawingUtilities.m */; };
Expand Down Expand Up @@ -147,8 +147,8 @@
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
B20AC0671267988600687143 /* SSTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSTableViewController.h; sourceTree = "<group>"; }; B20AC0671267988600687143 /* SSTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSTableViewController.h; sourceTree = "<group>"; };
B20AC0681267988600687143 /* SSTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSTableViewController.m; sourceTree = "<group>"; }; B20AC0681267988600687143 /* SSTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSTableViewController.m; sourceTree = "<group>"; };
B2136B3A13ABCC0C00FEBCFD /* SSBordererView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSBordererView.h; sourceTree = "<group>"; }; B2136B3A13ABCC0C00FEBCFD /* SSBorderedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSBorderedView.h; sourceTree = "<group>"; };
B2136B3B13ABCC0C00FEBCFD /* SSBordererView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSBordererView.m; sourceTree = "<group>"; }; B2136B3B13ABCC0C00FEBCFD /* SSBorderedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSBorderedView.m; sourceTree = "<group>"; };
B215045E10583A7300409ED4 /* SSToolkit_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSToolkit_Prefix.pch; sourceTree = "<group>"; }; B215045E10583A7300409ED4 /* SSToolkit_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSToolkit_Prefix.pch; sourceTree = "<group>"; };
B215051110583BBB00409ED4 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; B215051110583BBB00409ED4 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
B21D2DFF121F2FE500161E66 /* SSDrawingUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSDrawingUtilities.m; sourceTree = "<group>"; }; B21D2DFF121F2FE500161E66 /* SSDrawingUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSDrawingUtilities.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -458,8 +458,8 @@
B290355913B9236E00CCAFC9 /* SSAnimatedImageView.m */, B290355913B9236E00CCAFC9 /* SSAnimatedImageView.m */,
B2EA9F6012F4A5E100C929D6 /* SSBadgeView.h */, B2EA9F6012F4A5E100C929D6 /* SSBadgeView.h */,
B2EA9F6112F4A5E100C929D6 /* SSBadgeView.m */, B2EA9F6112F4A5E100C929D6 /* SSBadgeView.m */,
B2136B3A13ABCC0C00FEBCFD /* SSBordererView.h */, B2136B3A13ABCC0C00FEBCFD /* SSBorderedView.h */,
B2136B3B13ABCC0C00FEBCFD /* SSBordererView.m */, B2136B3B13ABCC0C00FEBCFD /* SSBorderedView.m */,
B27B1A1912241D3400111EA2 /* SSCollectionView.h */, B27B1A1912241D3400111EA2 /* SSCollectionView.h */,
B27B1A1A12241D3400111EA2 /* SSCollectionView.m */, B27B1A1A12241D3400111EA2 /* SSCollectionView.m */,
B27B1A2012241D6F00111EA2 /* SSCollectionViewItem.h */, B27B1A2012241D6F00111EA2 /* SSCollectionViewItem.h */,
Expand Down Expand Up @@ -627,7 +627,7 @@
B2FC71BB1330424F00D4FCCF /* SSCollectionViewItemInternal.h in Headers */, B2FC71BB1330424F00D4FCCF /* SSCollectionViewItemInternal.h in Headers */,
B2D8829413328EEF006B3F55 /* SSHUDWindow.h in Headers */, B2D8829413328EEF006B3F55 /* SSHUDWindow.h in Headers */,
B25C8E611394327000DE7BFF /* SSCollectionViewExtremityTableViewCell.h in Headers */, B25C8E611394327000DE7BFF /* SSCollectionViewExtremityTableViewCell.h in Headers */,
B2136B3C13ABCC0C00FEBCFD /* SSBordererView.h in Headers */, B2136B3C13ABCC0C00FEBCFD /* SSBorderedView.h in Headers */,
B280E25F13BA76A300FCDA5C /* SSAnimatedImageView.h in Headers */, B280E25F13BA76A300FCDA5C /* SSAnimatedImageView.h in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -779,7 +779,7 @@
B2ABC6931329D14300521D20 /* SSCollectionViewItemTableViewCell.m in Sources */, B2ABC6931329D14300521D20 /* SSCollectionViewItemTableViewCell.m in Sources */,
B2D8829513328EEF006B3F55 /* SSHUDWindow.m in Sources */, B2D8829513328EEF006B3F55 /* SSHUDWindow.m in Sources */,
B25C8E601394327000DE7BFF /* SSCollectionViewExtremityTableViewCell.m in Sources */, B25C8E601394327000DE7BFF /* SSCollectionViewExtremityTableViewCell.m in Sources */,
B2136B3D13ABCC0C00FEBCFD /* SSBordererView.m in Sources */, B2136B3D13ABCC0C00FEBCFD /* SSBorderedView.m in Sources */,
B280E25D13BA769C00FCDA5C /* SSAnimatedImageView.m in Sources */, B280E25D13BA769C00FCDA5C /* SSAnimatedImageView.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
Expand Down
24 changes: 24 additions & 0 deletions SSToolkit/NSArray+SSToolkitAdditions.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -40,4 +40,28 @@
*/ */
- (NSArray *)shuffledArray; - (NSArray *)shuffledArray;


///--------------
/// @name Hashing
///--------------

/**
Returns a string of the MD5 sum of the receiver.
@return The string of the MD5 sum of the receiver.
Internally, `NSPropertyListSerialization` is used to created the hash. Only objects that can be serialized should be
contained in the receiver when calling this method.
*/
- (NSString *)MD5Sum;

/**
Returns a string of the SHA1 sum of the receiver.
@return The string of the SHA1 sum of the receiver.
Internally, `NSPropertyListSerialization` is used to created the hash. Only objects that can be serialized should be
contained in the receiver when calling this method.
*/
- (NSString *)SHA1Sum;

@end @end
24 changes: 24 additions & 0 deletions SSToolkit/NSArray+SSToolkitAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
// //


#import "NSArray+SSToolkitAdditions.h" #import "NSArray+SSToolkitAdditions.h"
#import "NSData+SSToolkitAdditions.h"

@interface NSArray (SSToolkitPrivateAdditions)
- (NSData *)_prehashData;
@end


@implementation NSArray (SSToolkitAdditions) @implementation NSArray (SSToolkitAdditions)


Expand Down Expand Up @@ -36,4 +41,23 @@ - (NSArray *)shuffledArray {
return array; return array;
} }



- (NSString *)MD5Sum {
return [[self _prehashData] MD5Sum];
}


- (NSString *)SHA1Sum {
return [[self _prehashData] SHA1Sum];
}

@end


@implementation NSArray (SSToolkitPrivateAdditions)

- (NSData *)_prehashData {
return [NSPropertyListSerialization dataWithPropertyList:self format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];
}

@end @end
24 changes: 24 additions & 0 deletions SSToolkit/NSDictionary+SSToolkitAdditions.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,4 +36,28 @@
*/ */
- (NSString *)stringWithFormEncodedComponents; - (NSString *)stringWithFormEncodedComponents;


///--------------
/// @name Hashing
///--------------

/**
Returns a string of the MD5 sum of the receiver.
@return The string of the MD5 sum of the receiver.
Internally, `NSPropertyListSerialization` is used to created the hash. Only objects that can be serialized should be
contained in the receiver when calling this method.
*/
- (NSString *)MD5Sum;

/**
Returns a string of the SHA1 sum of the receiver.
@return The string of the SHA1 sum of the receiver.
Internally, `NSPropertyListSerialization` is used to created the hash. Only objects that can be serialized should be
contained in the receiver when calling this method.
*/
- (NSString *)SHA1Sum;

@end @end
24 changes: 24 additions & 0 deletions SSToolkit/NSDictionary+SSToolkitAdditions.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@


#import "NSDictionary+SSToolkitAdditions.h" #import "NSDictionary+SSToolkitAdditions.h"
#import "NSString+SSToolkitAdditions.h" #import "NSString+SSToolkitAdditions.h"
#import "NSData+SSToolkitAdditions.h"

@interface NSDictionary (SSToolkitPrivateAdditions)
- (NSData *)_prehashData;
@end


@implementation NSDictionary (SSToolkitAdditions) @implementation NSDictionary (SSToolkitAdditions)


Expand Down Expand Up @@ -57,4 +62,23 @@ - (NSString *)stringWithFormEncodedComponents {
return [arguments componentsJoinedByString:@"&"]; return [arguments componentsJoinedByString:@"&"];
} }



- (NSString *)MD5Sum {
return [[self _prehashData] MD5Sum];
}


- (NSString *)SHA1Sum {
return [[self _prehashData] SHA1Sum];
}

@end


@implementation NSDictionary (SSToolkitPrivateAdditions)

- (NSData *)_prehashData {
return [NSPropertyListSerialization dataWithPropertyList:self format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];
}

@end @end
12 changes: 8 additions & 4 deletions SSToolkit/SSBadgeView.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ @implementation SSBadgeView
@synthesize badgeColor = _badgeColor; @synthesize badgeColor = _badgeColor;


- (void)setBadgeColor:(UIColor *)badgeColor { - (void)setBadgeColor:(UIColor *)badgeColor {
[badgeColor retain];
[_badgeColor release]; [_badgeColor release];
_badgeColor = [badgeColor retain]; _badgeColor = badgeColor;


[self setNeedsDisplay]; [self setNeedsDisplay];
} }
Expand All @@ -29,26 +30,29 @@ - (void)setBadgeColor:(UIColor *)badgeColor {
@synthesize highlightedBadgeColor = _highlightedBadgeColor; @synthesize highlightedBadgeColor = _highlightedBadgeColor;


- (void)setHighlightedBadgeColor:(UIColor *)highlightedBadgeColor { - (void)setHighlightedBadgeColor:(UIColor *)highlightedBadgeColor {
[highlightedBadgeColor retain];
[_highlightedBadgeColor release]; [_highlightedBadgeColor release];
_highlightedBadgeColor = [highlightedBadgeColor retain]; _highlightedBadgeColor = highlightedBadgeColor;


[self setNeedsDisplay]; [self setNeedsDisplay];
} }


@synthesize badgeImage = _badgeImage; @synthesize badgeImage = _badgeImage;


- (void)setBadgeImage:(UIImage *)badgeImage { - (void)setBadgeImage:(UIImage *)badgeImage {
[badgeImage retain];
[_badgeImage release]; [_badgeImage release];
_badgeImage = [badgeImage retain]; _badgeImage = badgeImage;


[self setNeedsDisplay]; [self setNeedsDisplay];
} }


@synthesize highlightedBadgeImage = _highlightedBadgeImage; @synthesize highlightedBadgeImage = _highlightedBadgeImage;


- (void)setHighlightedBadgeImage:(UIImage *)highlightedBadgeImage { - (void)setHighlightedBadgeImage:(UIImage *)highlightedBadgeImage {
[highlightedBadgeImage retain];
[_highlightedBadgeImage release]; [_highlightedBadgeImage release];
_highlightedBadgeImage = [highlightedBadgeImage retain]; _highlightedBadgeImage = highlightedBadgeImage;


[self setNeedsDisplay]; [self setNeedsDisplay];
} }
Expand Down
4 changes: 2 additions & 2 deletions SSToolkit/SSBordererView.h → SSToolkit/SSBorderedView.h
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
// //
// SSBordererView.h // SSBorderedView.h
// SSToolkit // SSToolkit
// //
// Created by Sam Soffes on 6/17/11. // Created by Sam Soffes on 6/17/11.
Expand All @@ -9,7 +9,7 @@
/** /**
Simple UIView for drawing top and bottom borders with optional insets in a view. Simple UIView for drawing top and bottom borders with optional insets in a view.
*/ */
@interface SSBordererView : UIView { @interface SSBorderedView : UIView {


@private @private


Expand Down
18 changes: 11 additions & 7 deletions SSToolkit/SSBordererView.m → SSToolkit/SSBorderedView.m
Original file line number Original file line Diff line number Diff line change
@@ -1,23 +1,24 @@
// //
// SSBordererView.m // SSBorderedView.m
// SSToolkit // SSToolkit
// //
// Created by Sam Soffes on 6/17/11. // Created by Sam Soffes on 6/17/11.
// Copyright 2011 Sam Soffes. All rights reserved. // Copyright 2011 Sam Soffes. All rights reserved.
// //


#import "SSBordererView.h" #import "SSBorderedView.h"
#import "SSDrawingUtilities.h" #import "SSDrawingUtilities.h"


@implementation SSBordererView @implementation SSBorderedView


#pragma mark - Accessors #pragma mark - Accessors


@synthesize topBorderColor = _topBorderColor; @synthesize topBorderColor = _topBorderColor;


- (void)setTopBorderColor:(UIColor *)topBorderColor { - (void)setTopBorderColor:(UIColor *)topBorderColor {
[topBorderColor retain];
[_topBorderColor release]; [_topBorderColor release];
_topBorderColor = [topBorderColor retain]; _topBorderColor = topBorderColor;


[self setNeedsDisplay]; [self setNeedsDisplay];
} }
Expand All @@ -26,8 +27,9 @@ - (void)setTopBorderColor:(UIColor *)topBorderColor {
@synthesize topInsetColor = _topInsetColor; @synthesize topInsetColor = _topInsetColor;


- (void)setTopInsetColor:(UIColor *)topInsetColor { - (void)setTopInsetColor:(UIColor *)topInsetColor {
[topInsetColor retain];
[_topInsetColor release]; [_topInsetColor release];
_topInsetColor = [topInsetColor retain]; _topInsetColor = topInsetColor;


[self setNeedsDisplay]; [self setNeedsDisplay];
} }
Expand All @@ -36,8 +38,9 @@ - (void)setTopInsetColor:(UIColor *)topInsetColor {
@synthesize bottomInsetColor = _bottomInsetColor; @synthesize bottomInsetColor = _bottomInsetColor;


- (void)setBottomInsetColor:(UIColor *)bottomInsetColor { - (void)setBottomInsetColor:(UIColor *)bottomInsetColor {
[bottomInsetColor retain];
[_bottomInsetColor release]; [_bottomInsetColor release];
_bottomInsetColor = [bottomInsetColor retain]; _bottomInsetColor = bottomInsetColor;


[self setNeedsDisplay]; [self setNeedsDisplay];
} }
Expand All @@ -46,8 +49,9 @@ - (void)setBottomInsetColor:(UIColor *)bottomInsetColor {
@synthesize bottomBorderColor = _bottomBorderColor; @synthesize bottomBorderColor = _bottomBorderColor;


- (void)setBottomBorderColor:(UIColor *)bottomBorderColor { - (void)setBottomBorderColor:(UIColor *)bottomBorderColor {
[bottomBorderColor retain];
[_bottomBorderColor release]; [_bottomBorderColor release];
_bottomBorderColor = [bottomBorderColor retain]; _bottomBorderColor = bottomBorderColor;


[self setNeedsDisplay]; [self setNeedsDisplay];
} }
Expand Down
14 changes: 14 additions & 0 deletions SSToolkit/SSCollectionView.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ typedef enum {
*/ */
@property (nonatomic, retain) UIView *backgroundView; @property (nonatomic, retain) UIView *backgroundView;


/**
Returns an accessory view that is displayed above the collection.
The default value is `nil`. The collection header view is different from a section header.
*/
@property (nonatomic, retain) UIView *collectionHeaderView;

/**
Returns an accessory view that is displayed below the collection.
The default value is `nil`. The collection footer view is different from a section footer.
*/
@property (nonatomic, retain) UIView *collectionFooterView;

/** /**
A Boolean value that determines whether selecting items is enabled. A Boolean value that determines whether selecting items is enabled.
Expand Down
34 changes: 27 additions & 7 deletions SSToolkit/SSCollectionView.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -88,14 +88,34 @@ - (UIView *)backgroundView {
} }




- (void)setBackgroundColor:(UIColor *)color { - (void)setBackgroundView:(UIView *)background {
[super setBackgroundColor:color]; _tableView.backgroundView = background;
_tableView.backgroundColor = color;
} }




- (void)setBackgroundView:(UIView *)background { - (UIView *)collectionHeaderView {
_tableView.backgroundView = background; return _tableView.tableHeaderView;
}


- (void)setCollectionHeaderView:(UIView *)collectionHeaderView {
_tableView.tableHeaderView = collectionHeaderView;
}


- (UIView *)collectionFooterView {
return _tableView.tableFooterView;
}


- (void)setCollectionFooterView:(UIView *)collectionFooterView {
_tableView.tableFooterView = collectionFooterView;
}


- (void)setBackgroundColor:(UIColor *)color {
[super setBackgroundColor:color];
_tableView.backgroundColor = color;
} }




Expand Down Expand Up @@ -425,7 +445,7 @@ - (NSArray *)_itemsForRowIndexPath:(NSIndexPath *)rowIndexPath {
NSUInteger startIndex = itemsPerRow * row; NSUInteger startIndex = itemsPerRow * row;
NSUInteger endIndex = (NSUInteger)fmin(totalItems, startIndex + itemsPerRow); NSUInteger endIndex = (NSUInteger)fmin(totalItems, startIndex + itemsPerRow);


NSMutableArray *items = [[NSMutableArray alloc] initWithCapacity:endIndex - startIndex]; NSMutableArray *items = [[[NSMutableArray alloc] initWithCapacity:endIndex - startIndex] autorelease];


for (NSUInteger i = startIndex; i < endIndex; i++) { for (NSUInteger i = startIndex; i < endIndex; i++) {
NSIndexPath *itemIndexPath = [NSIndexPath indexPathForRow:i inSection:rowIndexPath.section]; NSIndexPath *itemIndexPath = [NSIndexPath indexPathForRow:i inSection:rowIndexPath.section];
Expand All @@ -444,7 +464,7 @@ - (NSArray *)_itemsForRowIndexPath:(NSIndexPath *)rowIndexPath {
[items addObject:item]; [items addObject:item];
} }


return [items autorelease]; return items;
} }




Expand Down
3 changes: 2 additions & 1 deletion SSToolkit/SSCollectionViewExtremityTableViewCell.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ @implementation SSCollectionViewExtremityTableViewCell
@synthesize extrimityView = _extrimityView; @synthesize extrimityView = _extrimityView;


- (void)setExtrimityView:(UIView *)view { - (void)setExtrimityView:(UIView *)view {
[view retain];
[_extrimityView removeFromSuperview]; [_extrimityView removeFromSuperview];
[_extrimityView release]; [_extrimityView release];
_extrimityView = [view retain]; _extrimityView = view;
[self addSubview:_extrimityView]; [self addSubview:_extrimityView];
} }


Expand Down
Loading

0 comments on commit 5f403d5

Please sign in to comment.