Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 18 files changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 08, 2011
@davidmorford Initial ARC upgrade. 6639f10
Showing with 82 additions and 158 deletions.
  1. +1 −1  Configurations/Compiler.xcconfig
  2. +1 −1  Configurations/DeploymentTarget.xcconfig
  3. +10 −18 Projects/Applications/TabBarKitCatalog/Source/Classes/ApplicationDelegate/TBKCApplicationDelegate.m
  4. +0 −4 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCContentViewController.m
  5. +3 −7 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCDetailViewController.m
  6. +3 −6 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCImagesViewController.m
  7. +1 −6 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCMasterViewController.m
  8. +3 −7 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCMoviesViewController.m
  9. +1 −5 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCSettingsViewController.m
  10. +8 −6 Projects/Applications/TabBarKitCatalog/Source/Project/main.m
  11. +2 −0  Projects/Applications/TabBarKitCatalog/TabBarKitCatalog.xcodeproj/project.pbxproj
  12. +4 −4 Projects/Libraries/TabBarKit/Source/Categories/NSObject+TBKAssociatedObject.h
  13. +4 −4 Projects/Libraries/TabBarKit/Source/Categories/NSObject+TBKAssociatedObject.m
  14. +1 −1  Projects/Libraries/TabBarKit/Source/Categories/UIImage+TBKMasking.m
  15. +4 −19 Projects/Libraries/TabBarKit/Source/Classes/TBKTabBar.m
  16. +32 −47 Projects/Libraries/TabBarKit/Source/Classes/TBKTabBarController.m
  17. +2 −22 Projects/Libraries/TabBarKit/Source/Classes/TBKTabBarItem.m
  18. +2 −0  Projects/Libraries/TabBarKit/TabBarKit.xcodeproj/project.pbxproj
View
2  Configurations/Compiler.xcconfig
@@ -16,6 +16,6 @@ ZERO_LINK = NO
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
-//CLANG_ENABLE_OBJC_ARC = NO
+CLANG_ENABLE_OBJC_ARC = YES
//LLVM_LTO = NO
View
2  Configurations/DeploymentTarget.xcconfig
@@ -3,4 +3,4 @@
// DeploymentTarget.xcconfig
//
-IPHONEOS_DEPLOYMENT_TARGET = 4.2 //latest_iphoneos
+IPHONEOS_DEPLOYMENT_TARGET = 5.0 //latest_iphoneos
View
28 Projects/Applications/TabBarKitCatalog/Source/Classes/ApplicationDelegate/TBKCApplicationDelegate.m
@@ -33,11 +33,11 @@ -(BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(
tabBarController = [[TBKTabBarController alloc] initWithStyle:TBKTabBarStyleDefault];
tabBarController.delegate = self;
tabBarController.viewControllers = [NSArray arrayWithObjects:
- [[[UINavigationController alloc] initWithRootViewController:[[[TBKCMasterViewController alloc] init] autorelease]] autorelease],
- [[[UINavigationController alloc] initWithRootViewController:[[[TBKCDetailViewController alloc] init] autorelease]] autorelease],
- [[[UINavigationController alloc] initWithRootViewController:[[[TBKCImagesViewController alloc] init] autorelease]] autorelease],
- [[[UINavigationController alloc] initWithRootViewController:[[[TBKCSettingsViewController alloc] init] autorelease]] autorelease],
- [[[UINavigationController alloc] initWithRootViewController:[[[TBKCMoviesViewController alloc] init] autorelease]] autorelease],
+ [[UINavigationController alloc] initWithRootViewController:[[TBKCMasterViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[TBKCDetailViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[TBKCImagesViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[TBKCSettingsViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[TBKCMoviesViewController alloc] init]],
nil];
window.rootViewController = self.tabBarController;
}
@@ -45,11 +45,11 @@ -(BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(
tabBarController = [[TBKTabBarController alloc] initWithStyle:TBKTabBarStyleArrowIndicator];
tabBarController.delegate = self;
tabBarController.viewControllers = [NSArray arrayWithObjects:
- [[[UINavigationController alloc] initWithRootViewController:[[[TBKCMasterViewController alloc] init] autorelease]] autorelease],
- [[[UINavigationController alloc] initWithRootViewController:[[[TBKCDetailViewController alloc] init] autorelease]] autorelease],
- [[[UINavigationController alloc] initWithRootViewController:[[[TBKCImagesViewController alloc] init] autorelease]] autorelease],
- [[[UINavigationController alloc] initWithRootViewController:[[[TBKCSettingsViewController alloc] init] autorelease]] autorelease],
- [[[UINavigationController alloc] initWithRootViewController:[[[TBKCMoviesViewController alloc] init] autorelease]] autorelease],
+ [[UINavigationController alloc] initWithRootViewController:[[TBKCMasterViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[TBKCDetailViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[TBKCImagesViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[TBKCSettingsViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[TBKCMoviesViewController alloc] init]],
nil];
window.rootViewController = self.tabBarController;
}
@@ -63,12 +63,4 @@ -(void) tabBarController:(TBKTabBarController *)tbc didSelectViewController:(UIV
}
-#pragma mark Memory
-
--(void) dealloc {
- [tabBarController release], tabBarController = nil;
- [window release], window = nil;
- [super dealloc];
-}
-
@end
View
4 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCContentViewController.m
@@ -38,8 +38,4 @@ -(void) didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
--(void) dealloc {
- [super dealloc];
-}
-
@end
View
10 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCDetailViewController.m
@@ -43,8 +43,9 @@ -(NSInteger) tableView:(UITableView *)tv numberOfRowsInSection:(NSInteger)aSecti
-(UITableViewCell *) tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)anIndexPath {
static NSString *CellIdentifier = @"CellIdentifier";
UITableViewCell *cell = [tv dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ if (cell == nil)
+ {
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.accessoryType = UITableViewCellAccessoryNone;
}
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
@@ -59,7 +60,6 @@ -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath
[aTableView deselectRowAtIndexPath:indexPath animated:YES];
TBKCContentViewController *contentViewController = [[TBKCContentViewController alloc] init];
[self.navigationController pushViewController:contentViewController animated:TRUE];
- [contentViewController release];
}
@@ -73,8 +73,4 @@ -(void) didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
--(void) dealloc {
- [super dealloc];
-}
-
@end
View
9 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCImagesViewController.m
@@ -43,8 +43,9 @@ -(NSInteger) tableView:(UITableView *)tv numberOfRowsInSection:(NSInteger)aSecti
-(UITableViewCell *) tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)anIndexPath {
static NSString *CellIdentifier = @"CellIdentifier";
UITableViewCell *cell = [tv dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ if (cell == nil)
+ {
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.accessoryType = UITableViewCellAccessoryNone;
}
cell.textLabel.text = [NSString stringWithFormat:@"Settings %d", anIndexPath.row];
@@ -62,8 +63,4 @@ -(void) didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
--(void) dealloc {
- [super dealloc];
-}
-
@end
View
7 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCMasterViewController.m
@@ -44,7 +44,7 @@ -(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
static NSString *CellIdentifier = @"CellIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.accessoryType = UITableViewCellAccessoryNone;
}
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
@@ -60,7 +60,6 @@ -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath
TBKCContentViewController *contentViewController = [[TBKCContentViewController alloc] init];
contentViewController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:contentViewController animated:TRUE];
- [contentViewController release];
}
@@ -74,8 +73,4 @@ -(void) didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
--(void) dealloc {
- [super dealloc];
-}
-
@end
View
10 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCMoviesViewController.m
@@ -44,8 +44,9 @@ -(NSInteger) tableView:(UITableView *)aTableView numberOfRowsInSection:(NSIntege
-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"CellIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ if (cell == nil)
+ {
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.accessoryType = UITableViewCellAccessoryNone;
}
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
@@ -61,7 +62,6 @@ -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath
TBKCContentViewController *contentViewController = [[TBKCContentViewController alloc] init];
contentViewController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:contentViewController animated:TRUE];
- [contentViewController release];
}
@@ -75,8 +75,4 @@ -(void) didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
--(void) dealloc {
- [super dealloc];
-}
-
@end
View
6 Projects/Applications/TabBarKitCatalog/Source/Classes/Controllers/TBKCSettingsViewController.m
@@ -48,7 +48,7 @@ -(UITableViewCell *) tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexP
static NSString *CellIdentifier = @"CellIdentifier";
UITableViewCell *cell = [tv dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.accessoryType = UITableViewCellAccessoryNone;
}
cell.textLabel.text = [NSString stringWithFormat:@"Settings %d", anIndexPath.row];
@@ -65,8 +65,4 @@ -(void) viewDidUnload {
[super viewDidUnload];
}
--(void) dealloc {
- [super dealloc];
-}
-
@end
View
14 Projects/Applications/TabBarKitCatalog/Source/Project/main.m
@@ -8,10 +8,12 @@
#import <UIKit/UIKit.h>
-int
-main(int argc, char *argv[]) {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- int retVal = UIApplicationMain(argc, argv, nil, @"TBKCApplicationDelegate");
- [pool release];
- return retVal;
+#import "TBKCApplicationDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool
+ {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([TBKCApplicationDelegate class]));
+ }
}
View
2  Projects/Applications/TabBarKitCatalog/TabBarKitCatalog.xcodeproj/project.pbxproj
@@ -478,6 +478,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 63F7E3DA137656490053B106 /* Debug.xcconfig */;
buildSettings = {
+ CLANG_ENABLE_OBJC_ARC = YES;
};
name = Debug;
};
@@ -485,6 +486,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 63F7E3DB137656490053B106 /* Release.xcconfig */;
buildSettings = {
+ CLANG_ENABLE_OBJC_ARC = YES;
};
name = Release;
};
View
8 Projects/Libraries/TabBarKit/Source/Categories/NSObject+TBKAssociatedObject.h
@@ -25,14 +25,14 @@ enum {
*/
@interface NSObject (TBKAssociatedObject)
--(id) associatedValueForKey:(NSString *)aKey;
+-(id) associatedValueForKey:(void *)aKey;
/*!
@abstract Retains value
*/
--(void) associateValue:(id)aValue withKey:(NSString *)aKey;
+-(void) associateValue:(id)aValue withKey:(void *)aKey;
--(void) removeAssociatedValueForKey:(NSString *)aKey;
+-(void) removeAssociatedValueForKey:(void *)aKey;
/*!
@method associateValue:withKey:policy:
@@ -43,6 +43,6 @@ contained view controllers without requiring a silly protocol or subclass. Yum.
@param aKey
@param aPolicy
*/
--(void) associateValue:(id)aValue withKey:(NSString *)aKey policy:(TBKAssociationPolicy)aPolicy;
+-(void) associateValue:(id)aValue withKey:(void *)aKey policy:(TBKAssociationPolicy)aPolicy;
@end
View
8 Projects/Libraries/TabBarKit/Source/Categories/NSObject+TBKAssociatedObject.m
@@ -3,19 +3,19 @@
@implementation NSObject (TBKAssociatedObject)
--(void) associateValue:(id)aValue withKey:(NSString *)aKey {
+-(void) associateValue:(id)aValue withKey:(void *)aKey {
objc_setAssociatedObject(self, aKey, aValue, TBKAssociationPolicyRetainNonatomic);
}
--(void) associateValue:(id)aValue withKey:(NSString *)aKey policy:(TBKAssociationPolicy)aPolicy;{
+-(void) associateValue:(id)aValue withKey:(void *)aKey policy:(TBKAssociationPolicy)aPolicy {
objc_setAssociatedObject(self, aKey, aValue, aPolicy);
}
--(id) associatedValueForKey:(NSString *)aKey {
+-(id) associatedValueForKey:(void *)aKey {
return objc_getAssociatedObject(self, aKey);
}
--(void) removeAssociatedValueForKey:(NSString *)aKey {
+-(void) removeAssociatedValueForKey:(void *)aKey {
[self associateValue:nil withKey:aKey policy:TBKAssociationPolicyAssign];
}
View
2  Projects/Libraries/TabBarKit/Source/Categories/UIImage+TBKMasking.m
@@ -51,7 +51,7 @@ -(UIImage *) imageMaskedWithColors:(NSArray *)aColorList opacity:(CGFloat)anOpac
[ar addObject:(id)c.CGColor];
}
CGColorSpaceRef space = CGBitmapContextGetColorSpace(context);
- CGGradientRef gradient = CGGradientCreateWithColors(space, (CFArrayRef)ar, NULL);
+ CGGradientRef gradient = CGGradientCreateWithColors(space, (__bridge CFArrayRef)ar, NULL); //__bridge_retained
CGContextDrawLinearGradient(context,
gradient,
CGPointMake(rect.origin.x, rect.origin.y + rect.size.height), //BUGBUG: Flip?
View
23 Projects/Libraries/TabBarKit/Source/Classes/TBKTabBar.m
@@ -28,16 +28,12 @@ -(id) init {
return self;
}
--(void) dealloc {
- [super dealloc];
-}
-
@end
#pragma mark -
@interface TBKTabBar ()
-@property (nonatomic, assign) TBKArrowLayer *arrowLayer;
+@property (nonatomic, retain) TBKArrowLayer *arrowLayer;
@property (nonatomic, assign) CGFloat tabMargin;
-(void) setArrowPositionAnimated:(BOOL)animated;
@end
@@ -114,10 +110,10 @@ -(void) setItems:(NSArray *)aTabBarItemArray {
[tabBarItem removeFromSuperview];
}
- [items release];
- items = [aTabBarItemArray retain];
+ items = aTabBarItemArray;
- if ([items count]) {
+ if ([items count])
+ {
[(TBKTabBarItem *)[items objectAtIndex:0] setSelected:YES];
self.selectedTabBarItem = [items objectAtIndex:0];
[self.delegate tabBar:self didSelectTabAtIndex:0];
@@ -203,15 +199,4 @@ -(BOOL) isCustomizing {
return NO;
}
-
-#pragma mark Memory
-
--(void) dealloc {
- self.arrowLayer = nil;
- self.delegate = nil;
- self.selectedTabBarItem = nil;
- self.items = nil;
- [super dealloc];
-}
-
@end
View
79 Projects/Libraries/TabBarKit/Source/Classes/TBKTabBarController.m
@@ -69,14 +69,14 @@ -(void) viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor clearColor];
- self.containerView = [[[UIView alloc] initWithFrame:self.view.frame] autorelease];
- self.view = self.containerView;
+ containerView = [[UIView alloc] initWithFrame:self.view.frame];
+ self.view = containerView;
- self.tabBar = [[[TBKTabBar alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(self.view.bounds) - self.tabBarHeight, CGRectGetWidth(self.view.bounds), self.tabBarHeight)
- style:self.tabBarStyle] autorelease];
- self.tabBar.delegate = self;
+ tabBar = [[TBKTabBar alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(self.view.bounds) - self.tabBarHeight, CGRectGetWidth(self.view.bounds), self.tabBarHeight)
+ style:self.tabBarStyle];
+ tabBar.delegate = self;
- [self.containerView addSubview:self.tabBar];
+ [containerView addSubview:tabBar];
[self loadViewControllers];
}
@@ -112,17 +112,19 @@ -(void) setViewControllers:(NSArray *)controllers animated:(BOOL)animated {
-(void) loadViewControllers {
NSMutableArray *controllerTabs = [NSMutableArray arrayWithCapacity:[self.viewControllers count]];
NSUInteger tagIndex = 0;
- for (UIViewController *controller in self.viewControllers) {
- if ([controller isKindOfClass:[UINavigationController class]]) {
+ for (UIViewController *controller in self.viewControllers)
+ {
+ if ([controller isKindOfClass:[UINavigationController class]])
+ {
((UINavigationController *)controller).delegate = self;
}
- TBKTabBarItem *tabItem = [[[TBKTabBarItem alloc] initWithImageName:controller.tabImageName style:self.tabBarStyle tag:tagIndex title:controller.title] autorelease];
+ TBKTabBarItem *tabItem = [[TBKTabBarItem alloc] initWithImageName:controller.tabImageName style:self.tabBarStyle tag:tagIndex title:controller.title];
[controllerTabs addObject:tabItem];
[controller setTabItem:tabItem];
[controller setTabController:self];
tagIndex++;
}
- self.tabBar.items = controllerTabs;
+ tabBar.items = controllerTabs;
}
-(void) unloadViewControllers {
@@ -285,76 +287,63 @@ -(void) didReceiveMemoryWarning {
-(void) viewDidUnload {
tabBar.delegate = nil;
- [tabBar release]; tabBar = nil;
- [containerView release]; containerView = nil;
[super viewDidUnload];
}
--(void) dealloc {
- self.delegate = nil;
- self.moreNavigationController = nil;
- self.customizableViewControllers = nil;
- self.selectedViewController = nil;
- self.viewControllers = nil;
- self.tabBar = nil;
- self.containerView = nil;
- [super dealloc];
-}
-
@end
#pragma mark -
@implementation UIViewController (TBKTabBarControllerItem)
-static NSString * const TBKTabItemKey = @"TBKTabItemKey";
-static NSString * const TBKTabControllerKey = @"TBKTabControllerKey";
+static char TBKTabItemKey;
+static char TBKTabControllerKey;
@dynamic tabItem;
@dynamic tabController;
-(TBKTabBarItem *) tabItem {
- return [self associatedValueForKey:TBKTabItemKey];
+ return [self associatedValueForKey:&TBKTabItemKey];
}
-(void) setTabItem:(TBKTabBarItem *)anItem {
if (anItem) {
- if ([self associatedValueForKey:TBKTabItemKey] != nil) {
- TBKTabBarItem *associatedItem = (TBKTabBarItem *)[self associatedValueForKey:TBKTabItemKey];
+ if ([self associatedValueForKey:&TBKTabItemKey] != nil) {
+ TBKTabBarItem *associatedItem = (TBKTabBarItem *)[self associatedValueForKey:&TBKTabItemKey];
if (associatedItem != anItem) {
- [self associateValue:nil withKey:TBKTabItemKey policy:TBKAssociationPolicyAssign];
- [self associateValue:anItem withKey:TBKTabItemKey policy:TBKAssociationPolicyRetainNonatomic];
+ [self associateValue:nil withKey:&TBKTabItemKey policy:TBKAssociationPolicyAssign];
+ [self associateValue:anItem withKey:&TBKTabItemKey policy:TBKAssociationPolicyRetainNonatomic];
}
- [self associateValue:nil withKey:TBKTabItemKey policy:TBKAssociationPolicyAssign];
+ [self associateValue:nil withKey:&TBKTabItemKey policy:TBKAssociationPolicyAssign];
}
else {
- [self associateValue:anItem withKey:TBKTabItemKey policy:TBKAssociationPolicyRetainNonatomic];
+ [self associateValue:anItem withKey:&TBKTabItemKey policy:TBKAssociationPolicyRetainNonatomic];
}
}
else {
- [self associateValue:nil withKey:TBKTabItemKey policy:TBKAssociationPolicyAssign];
+ [self associateValue:nil withKey:&TBKTabItemKey policy:TBKAssociationPolicyAssign];
}
}
-(TBKTabBarController *) tabController {
- return [self associatedValueForKey:TBKTabControllerKey];
+ return [self associatedValueForKey:&TBKTabControllerKey];
}
-(void) setTabController:(TBKTabBarController *)aTabController {
if (aTabController) {
- if ([self associatedValueForKey:TBKTabControllerKey] != nil) {
- TBKTabBarController *associatedController = (TBKTabBarController *)[self associatedValueForKey:TBKTabControllerKey];
+ if ([self associatedValueForKey:&TBKTabControllerKey] != nil) {
+ TBKTabBarController *associatedController = (TBKTabBarController *)[self associatedValueForKey:&TBKTabControllerKey];
if (associatedController != aTabController) {
- [self associateValue:nil withKey:TBKTabControllerKey policy:TBKAssociationPolicyAssign];
- [self associateValue:aTabController withKey:TBKTabControllerKey policy:TBKAssociationPolicyRetainNonatomic];
+ [self associateValue:nil withKey:&TBKTabControllerKey policy:TBKAssociationPolicyAssign];
+ [self associateValue:aTabController withKey:&TBKTabControllerKey policy:TBKAssociationPolicyRetainNonatomic];
}
}
else {
- [self associateValue:aTabController withKey:TBKTabControllerKey policy:TBKAssociationPolicyRetainNonatomic];
+ [self associateValue:aTabController withKey:&TBKTabControllerKey policy:TBKAssociationPolicyRetainNonatomic];
}
}
else {
- [self associateValue:nil withKey:TBKTabControllerKey policy:TBKAssociationPolicyAssign];
+ [self associateValue:nil withKey:&TBKTabControllerKey policy:TBKAssociationPolicyAssign];
}
}
@@ -425,8 +414,9 @@ -(NSInteger) tableView:(UITableView *)tv numberOfRowsInSection:(NSInteger)sectio
-(UITableViewCell *) tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)anIndexPath {
static NSString *TBKMoreCellIdentifier = @"TBKMoreCellID";
UITableViewCell *cell = [tv dequeueReusableCellWithIdentifier:TBKMoreCellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:TBKMoreCellIdentifier] autorelease];
+ if (cell == nil)
+ {
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:TBKMoreCellIdentifier];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
@@ -475,11 +465,6 @@ -(void) didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
--(void) dealloc {
- self.moreViewControllers = nil;
- [super dealloc];
-}
-
@end
#pragma mark -
View
24 Projects/Libraries/TabBarKit/Source/Classes/TBKTabBarItem.m
@@ -97,11 +97,6 @@ -(void) setCountString:(NSString *)aString {
[self setNeedsDisplay];
}
-
--(void) dealloc {
- [super dealloc];
-}
-
@end
#pragma mark -
@@ -116,8 +111,8 @@ @interface TBKTabBarItem ()
@property (nonatomic, retain) NSString *tabTitle;
@property (nonatomic, assign) BOOL displayTitle;
-@property (nonatomic, assign) TBKTabBarItemSelectionLayer *selectionLayer;
-@property (nonatomic, assign) TBKBadgeLayer *badgeLayer;
+@property (nonatomic, retain) TBKTabBarItemSelectionLayer *selectionLayer;
+@property (nonatomic, retain) TBKBadgeLayer *badgeLayer;
@end
#pragma mark -
@@ -217,7 +212,6 @@ -(void) setHighlighted:(BOOL)flag {
-(void) setBadgeValue:(NSNumber *)aValue {
if ([badgeValue compare:aValue] != NSOrderedSame) {
- [badgeValue release];
badgeValue = [aValue copy];
}
if (!self.badgeLayer) {
@@ -233,18 +227,4 @@ -(void) setBadgeValue:(NSNumber *)aValue {
}
}
-
-
-#pragma mark -
-
--(void) dealloc {
- self.tabTitle = nil;
- self.controllerTitle = nil;
- self.badgeValue = nil;
- self.imageName = nil;
- self.tabImage = nil;
- self.selectedTabImage = nil;
- [super dealloc];
-}
-
@end
View
2  Projects/Libraries/TabBarKit/TabBarKit.xcodeproj/project.pbxproj
@@ -326,6 +326,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 63F7E3D2137655D40053B106 /* Debug.xcconfig */;
buildSettings = {
+ CLANG_ENABLE_OBJC_ARC = YES;
};
name = Debug;
};
@@ -333,6 +334,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 63F7E3D3137655D40053B106 /* Release.xcconfig */;
buildSettings = {
+ CLANG_ENABLE_OBJC_ARC = YES;
};
name = Release;
};

No commit comments for this range

Something went wrong with that request. Please try again.