Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

OOps didn't checkout arc branch.

Revert "converted to ARC"

This reverts commit 5cb7f65.
  • Loading branch information...
commit 2b98fc972f566e073825f08cbb45dfffd33e73e0 1 parent 5cb7f65
@alist authored
View
32 .gitignore
@@ -1,25 +1,15 @@
-# xcode noise
+# Xcode
build/*
*.pbxuser
+!default.pbxuser
*.mode1v3
-
-# old skool
-.svn
-
-# osx noise
-.DS_Store
-profile
-
-src/swypPhotos.xcodeproj/project.xcworkspace/xcuserdata/*
-*.xcodeproj/xcuserdata/*
-*.xcodeproj/project.xcworkspace/xcuserdata/*
-*.xcuserdatad/*
-*xcodeproj/project.xcworkspace/*
-
-*.perspective
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
*.perspectivev3
-*.swp
-*~.nib
-aho.perspectivev3
-aho.xcuserdatad
-alist.xcuserdatad
+!default.perspectivev3
+*.xcworkspace
+!default.xcworkspace
+xcuserdata
+profile
+*.moved-aside
View
16 Source/BHTabStyle.h
@@ -29,17 +29,17 @@
@property (nonatomic, assign) CGFloat shadowRadius;
-@property (nonatomic, strong) UIColor *selectedTabColor;
-@property (nonatomic, strong) UIColor *selectedTitleTextColor;
-@property (nonatomic, strong) UIFont *selectedTitleFont;
+@property (nonatomic, retain) UIColor *selectedTabColor;
+@property (nonatomic, retain) UIColor *selectedTitleTextColor;
+@property (nonatomic, retain) UIFont *selectedTitleFont;
@property (nonatomic, assign) CGSize selectedTitleShadowOffset;
-@property (nonatomic, strong) UIColor *selectedTitleShadowColor;
+@property (nonatomic, retain) UIColor *selectedTitleShadowColor;
-@property (nonatomic, strong) UIColor *unselectedTabColor;
-@property (nonatomic, strong) UIColor *unselectedTitleTextColor;
-@property (nonatomic, strong) UIFont *unselectedTitleFont;
+@property (nonatomic, retain) UIColor *unselectedTabColor;
+@property (nonatomic, retain) UIColor *unselectedTitleTextColor;
+@property (nonatomic, retain) UIFont *unselectedTitleFont;
@property (nonatomic, assign) CGSize unselectedTitleShadowOffset;
-@property (nonatomic, strong) UIColor *unselectedTitleShadowColor;
+@property (nonatomic, retain) UIColor *unselectedTitleShadowColor;
+ (BHTabStyle *)defaultStyle;
View
2  Source/BHTabStyle.m
@@ -48,7 +48,7 @@ - (void)setTabHeight:(NSUInteger)newTabHeight {
}
+ (BHTabStyle *)defaultStyle {
- return [[BHTabStyle alloc] init];
+ return [[[BHTabStyle alloc] init] autorelease];
}
@end
View
6 Source/BHTabView.h
@@ -9,10 +9,10 @@
@interface BHTabView : UIView
-@property (nonatomic, strong, readonly) UILabel *titleLabel;
-@property (nonatomic, unsafe_unretained) id <BHTabViewDelegate> delegate;
+@property (nonatomic, retain, readonly) UILabel *titleLabel;
+@property (nonatomic, assign) id <BHTabViewDelegate> delegate;
@property (nonatomic, assign) BOOL selected;
-@property (nonatomic, strong) BHTabStyle *style;
+@property (nonatomic, retain) BHTabStyle *style;
- (id)initWithFrame:(CGRect)frame title:(NSString *)title;
View
18 Source/BHTabView.m
@@ -21,7 +21,7 @@ static inline CGFloat radians(CGFloat degrees) {
@interface BHTabView ()
-@property (nonatomic, strong, readwrite) UILabel *titleLabel;
+@property (nonatomic, retain, readwrite) UILabel *titleLabel;
- (CGFloat)_sectionWidth;
- (CGSize)_gridSize;
@@ -43,7 +43,7 @@ - (id)initWithFrame:(CGRect)frame title:(NSString *)title {
self.style = [BHTabStyle defaultStyle];
CGRect labelFrame = [self _tabRect];
- self.titleLabel = [[UILabel alloc] initWithFrame:labelFrame];
+ self.titleLabel = [[[UILabel alloc] initWithFrame:labelFrame] autorelease];
self.titleLabel.text = title;
self.titleLabel.textAlignment = UITextAlignmentCenter;
self.titleLabel.lineBreakMode = UILineBreakModeTailTruncation;
@@ -54,9 +54,9 @@ - (id)initWithFrame:(CGRect)frame title:(NSString *)title {
self.titleLabel.shadowOffset = self.style.unselectedTitleShadowOffset;
[self addSubview:self.titleLabel];
- [self addGestureRecognizer:[[UITapGestureRecognizer alloc]
+ [self addGestureRecognizer:[[[UITapGestureRecognizer alloc]
initWithTarget:self
- action:@selector(_onTap:)]];
+ action:@selector(_onTap:)] autorelease]];
}
return self;
@@ -149,9 +149,9 @@ - (void)drawRect:(CGRect)rect {
CGColorRef startColor = [UIColor whiteColor].CGColor;
CGColorRef endColor = tabColor;
- NSArray *colors = [NSArray arrayWithObjects:(__bridge id)startColor, (__bridge id)endColor, nil];
+ NSArray *colors = [NSArray arrayWithObjects:(id)startColor, (id)endColor, nil];
- CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)colors, locations);
+ CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (CFArrayRef)colors, locations);
CGRect tabRect = [self _tabRect];
CGPoint startPoint = CGPointMake(CGRectGetMidX(tabRect), tabRect.origin.y);
@@ -186,5 +186,11 @@ - (void)setSelected:(BOOL)isSelected {
[self setNeedsDisplay];
}
+- (void)dealloc {
+ self.titleLabel = nil;
+ self.style = nil;
+
+ [super dealloc];
+}
@end
View
2  Source/BHTabsFooterView.h
@@ -6,6 +6,6 @@
@interface BHTabsFooterView : UIView
-@property (nonatomic, strong) BHTabStyle *style;
+@property (nonatomic, retain) BHTabStyle *style;
@end
View
4 Source/BHTabsFooterView.m
@@ -31,5 +31,9 @@ - (void)drawRect:(CGRect)rect {
CGContextRestoreGState(context);
}
+- (void)dealloc {
+ [style release];
+ [super dealloc];
+}
@end
View
4 Source/BHTabsView.h
@@ -7,8 +7,8 @@
BHTabStyle *style;
}
-@property (nonatomic, strong) NSArray *tabViews;
-@property (nonatomic, strong) BHTabStyle *style;
+@property (nonatomic, retain) NSArray *tabViews;
+@property (nonatomic, retain) BHTabStyle *style;
@end
View
6 Source/BHTabsView.m
@@ -29,5 +29,11 @@ - (void)layoutSubviews {
}
}
+- (void)dealloc {
+ self.tabViews = nil;
+ self.style = nil;
+
+ [super dealloc];
+}
@end
View
10 Source/BHTabsViewController.h
@@ -18,17 +18,17 @@
@interface BHTabsViewController : UIViewController <BHTabViewDelegate> {
NSArray *tabNames;
- UIView *__weak contentView;
+ UIView *contentView;
BHTabsView *tabsContainerView;
BHTabsFooterView *footerView;
BHTabStyle *tabStyle;
NSUInteger currentTabIndex;
- id <BHTabsViewControllerDelegate> __unsafe_unretained delegate;
+ id <BHTabsViewControllerDelegate> delegate;
}
-@property (nonatomic, unsafe_unretained) id <BHTabsViewControllerDelegate> delegate;
-@property (nonatomic, weak, readonly) UIView *contentView;
-@property (nonatomic, strong) BHTabStyle *style;
+@property (nonatomic, assign) id <BHTabsViewControllerDelegate> delegate;
+@property (nonatomic, assign, readonly) UIView *contentView;
+@property (nonatomic, retain) BHTabStyle *style;
-(id)initWithTabNames:(NSArray*)tabNames style:(BHTabStyle *)style;
View
19 Source/BHTabsViewController.m
@@ -7,10 +7,10 @@
@interface BHTabsViewController ()
-@property (nonatomic, strong) NSArray *tabNames;
+@property (nonatomic, retain) NSArray *tabNames;
@property (nonatomic, assign, readwrite) UIView *contentView;
-@property (nonatomic, strong) BHTabsView *tabsContainerView;
-@property (nonatomic, strong) BHTabsFooterView *footerView;
+@property (nonatomic, retain) BHTabsView *tabsContainerView;
+@property (nonatomic, retain) BHTabsFooterView *footerView;
@end
@@ -32,6 +32,14 @@ -(id)initWithTabNames:(NSArray*)theTabNames style:(BHTabStyle *)theStyle{
}
+- (void)dealloc {
+ self.style = nil;
+ self.tabNames = nil;
+ self.tabsContainerView = nil;
+ self.footerView = nil;
+
+ [super dealloc];
+}
- (void)_reconfigureTabs {
NSUInteger thisIndex = 0;
@@ -81,6 +89,7 @@ - (void)loadView {
CGRect frame = [UIScreen mainScreen].applicationFrame;
UIView *view = [[UIView alloc] initWithFrame:frame];
self.view = view;
+ [view release];
self.view.backgroundColor = [UIColor clearColor];
self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth;
@@ -88,7 +97,7 @@ - (void)loadView {
// The view that contains the tab views is located across the top.
CGRect tabsViewFrame = CGRectMake(0, 0, frame.size.width, self.style.tabsViewHeight);
- self.tabsContainerView = [[BHTabsView alloc] initWithFrame:tabsViewFrame];
+ self.tabsContainerView = [[[BHTabsView alloc] initWithFrame:tabsViewFrame] autorelease];
self.tabsContainerView.backgroundColor = [UIColor clearColor];
self.tabsContainerView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
self.tabsContainerView.style = self.style;
@@ -131,7 +140,7 @@ - (void)loadView {
tabsViewFrame.size.width,
self.style.tabBarHeight + self.style.shadowRadius);
- self.footerView = [[BHTabsFooterView alloc] initWithFrame:footerFrame];
+ self.footerView = [[[BHTabsFooterView alloc] initWithFrame:footerFrame] autorelease];
self.footerView.backgroundColor = [UIColor clearColor];
self.footerView.style = self.style;
self.footerView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
Please sign in to comment.
Something went wrong with that request. Please try again.