diff --git a/Classes/DataViewController.h b/Classes/DataViewController.h index 9a74fc9..37924d3 100755 --- a/Classes/DataViewController.h +++ b/Classes/DataViewController.h @@ -45,6 +45,6 @@ - (id)initWithFrame:(CGRect)frame; -@property(nonatomic, retain)UITableView* tableView; +@property(nonatomic, strong)UITableView* tableView; @end diff --git a/Classes/DataViewController.m b/Classes/DataViewController.m index 45053f5..2e765a5 100755 --- a/Classes/DataViewController.m +++ b/Classes/DataViewController.m @@ -57,7 +57,6 @@ - (id)initWithFrame:(CGRect)frame { UIView* footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 1)]; _tableView.tableFooterView = footerView; - [footerView release]; [_tableView setAutoresizingMask:UIViewAutoresizingFlexibleHeight]; [self.view addSubview:_tableView]; @@ -105,7 +104,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } // Configure the cell... @@ -122,7 +121,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { DataViewController *dataViewController = [[DataViewController alloc] initWithFrame:CGRectMake(0, 0, 477, self.view.frame.size.height)]; [[StackScrollViewAppDelegate instance].rootViewController.stackScrollViewController addViewInSlider:dataViewController invokeByController:self isStackStartView:FALSE]; - [dataViewController release]; } @@ -137,9 +135,6 @@ - (void)viewDidUnload { } -- (void)dealloc { - [super dealloc]; -} @end diff --git a/Classes/MenuViewController.h b/Classes/MenuViewController.h index 11321ec..ef05eea 100755 --- a/Classes/MenuViewController.h +++ b/Classes/MenuViewController.h @@ -44,6 +44,6 @@ } - (id)initWithFrame:(CGRect)frame; -@property(nonatomic, retain)UITableView* tableView; +@property(nonatomic, strong)UITableView* tableView; @end diff --git a/Classes/MenuViewController.m b/Classes/MenuViewController.m index 3505011..be0bc67 100755 --- a/Classes/MenuViewController.m +++ b/Classes/MenuViewController.m @@ -60,7 +60,6 @@ - (id)initWithFrame:(CGRect)frame { UIView* footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 1)]; _tableView.tableFooterView = footerView; - [footerView release]; [self.view addSubview:_tableView]; @@ -69,7 +68,6 @@ - (id)initWithFrame:(CGRect)frame { [verticalLineView setBackgroundColor:[UIColor whiteColor]]; [self.view addSubview:verticalLineView]; [self.view bringSubviewToFront:verticalLineView]; - [verticalLineView release]; } return self; @@ -121,8 +119,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; - UIView* bgView = [[[UIView alloc] init] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; + UIView* bgView = [[UIView alloc] init]; [bgView setBackgroundColor:[UIColor colorWithWhite:2 alpha:0.2]]; [cell setSelectedBackgroundView:bgView]; } @@ -142,7 +140,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { DataViewController *dataViewController = [[DataViewController alloc] initWithFrame:CGRectMake(0, 0, 477, self.view.frame.size.height)]; [[StackScrollViewAppDelegate instance].rootViewController.stackScrollViewController addViewInSlider:dataViewController invokeByController:self isStackStartView:TRUE]; - [dataViewController release]; } @@ -157,10 +154,6 @@ - (void)viewDidUnload { } -- (void)dealloc { - [_tableView release]; - [super dealloc]; -} @end diff --git a/Classes/RootViewController.h b/Classes/RootViewController.h index 190f2fa..8d765aa 100755 --- a/Classes/RootViewController.h +++ b/Classes/RootViewController.h @@ -54,8 +54,8 @@ } -@property (nonatomic, retain) MenuViewController* menuViewController; -@property (nonatomic, retain) StackScrollViewController* stackScrollViewController; +@property (nonatomic, strong) MenuViewController* menuViewController; +@property (nonatomic, strong) StackScrollViewController* stackScrollViewController; @end diff --git a/Classes/RootViewController.m b/Classes/RootViewController.m index cde96b8..004a321 100755 --- a/Classes/RootViewController.m +++ b/Classes/RootViewController.m @@ -155,9 +155,4 @@ - (void)viewDidUnload { [super viewDidUnload]; } - -- (void)dealloc { - [super dealloc]; -} - @end diff --git a/Classes/StackScrollViewAppDelegate.h b/Classes/StackScrollViewAppDelegate.h index e992670..ba4e218 100755 --- a/Classes/StackScrollViewAppDelegate.h +++ b/Classes/StackScrollViewAppDelegate.h @@ -47,8 +47,8 @@ + (StackScrollViewAppDelegate *) instance; -@property (nonatomic, retain) IBOutlet UIWindow *window; -@property (nonatomic, retain) RootViewController *rootViewController; +@property (nonatomic, strong) IBOutlet UIWindow *window; +@property (nonatomic, strong) RootViewController *rootViewController; @end diff --git a/Classes/StackScrollViewAppDelegate.m b/Classes/StackScrollViewAppDelegate.m index 5cc2225..e8a2524 100755 --- a/Classes/StackScrollViewAppDelegate.m +++ b/Classes/StackScrollViewAppDelegate.m @@ -97,11 +97,6 @@ Free up as much memory as possible by purging cached data objects that can be re } -- (void)dealloc { - [rootViewController release]; - [window release]; - [super dealloc]; -} @end diff --git a/Classes/StackScrollViewController.h b/Classes/StackScrollViewController.h index 327bad9..1a7b435 100644 --- a/Classes/StackScrollViewController.h +++ b/Classes/StackScrollViewController.h @@ -35,7 +35,7 @@ // Created by Reefaq Mohammed Mac Pro on 5/10/11. // Copyright 2011 raw engineering. All rights reserved. // - +#import #import @@ -70,10 +70,10 @@ - (void) addViewInSlider:(UIViewController*)controller invokeByController:(UIViewController*)invokeByController isStackStartView:(BOOL)isStackStartView; - (void)bounceBack:(NSString*)animationID finished:(NSNumber*)finished context:(void*)context; -@property (nonatomic, retain) UIView* slideViews; -@property (nonatomic, retain) UIView* borderViews; +@property (nonatomic, strong) UIView* slideViews; +@property (nonatomic, strong) UIView* borderViews; @property (nonatomic, assign) CGFloat slideStartPosition; -@property (nonatomic, assign) NSMutableArray* viewControllersStack; +@property (nonatomic) NSMutableArray* viewControllersStack; diff --git a/Classes/StackScrollViewController.m b/Classes/StackScrollViewController.m index 3d0d6cc..0ea838b 100644 --- a/Classes/StackScrollViewController.m +++ b/Classes/StackScrollViewController.m @@ -37,7 +37,7 @@ // #import "StackScrollViewController.h" -#import "UIViewWithShadow.h"; +#import "UIViewWithShadow.h" const NSInteger SLIDE_VIEWS_MINUS_X_POSITION = -130; const NSInteger SLIDE_VIEWS_START_X_POS = 0; @@ -53,13 +53,13 @@ -(id)init { viewControllersStack = [[NSMutableArray alloc] init]; borderViews = [[UIView alloc] initWithFrame:CGRectMake(SLIDE_VIEWS_MINUS_X_POSITION - 2, -2, 2, self.view.frame.size.height)]; [borderViews setBackgroundColor:[UIColor clearColor]]; - UIView* verticalLineView1 = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, borderViews.frame.size.height)] autorelease]; + UIView* verticalLineView1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, borderViews.frame.size.height)]; [verticalLineView1 setBackgroundColor:[UIColor whiteColor]]; [verticalLineView1 setTag:1]; [verticalLineView1 setHidden:TRUE]; [borderViews addSubview:verticalLineView1]; - UIView* verticalLineView2 = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 2, borderViews.frame.size.height)] autorelease]; + UIView* verticalLineView2 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 2, borderViews.frame.size.height)]; [verticalLineView2 setBackgroundColor:[UIColor grayColor]]; [verticalLineView2 setTag:2]; [verticalLineView2 setHidden:TRUE]; @@ -90,7 +90,6 @@ -(id)init { [panRecognizer setDelaysTouchesEnded:TRUE]; [panRecognizer setCancelsTouchesInView:TRUE]; [self.view addGestureRecognizer:panRecognizer]; - [panRecognizer release]; [self.view addSubview:slideViews]; @@ -693,7 +692,7 @@ - (void)addViewInSlider:(UIViewController*)controller invokeByController:(UIView } if ([slideViews.subviews count] != 0) { - UIViewWithShadow* verticalLineView = [[[UIViewWithShadow alloc] initWithFrame:CGRectMake(-40, 0, 40 , self.view.frame.size.height)] autorelease]; + UIViewWithShadow* verticalLineView = [[UIViewWithShadow alloc] initWithFrame:CGRectMake(-40, 0, 40 , self.view.frame.size.height)]; [verticalLineView setBackgroundColor:[UIColor clearColor]]; [verticalLineView setAutoresizingMask:UIViewAutoresizingFlexibleHeight]; [verticalLineView setClipsToBounds:NO]; @@ -856,11 +855,6 @@ - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceO } } -- (void)dealloc { - [slideViews release]; - [viewControllersStack release]; - [super dealloc]; -} @end \ No newline at end of file diff --git a/StackScrollView.xcodeproj/project.pbxproj b/StackScrollView.xcodeproj/project.pbxproj index 5c7250e..f110c42 100755 --- a/StackScrollView.xcodeproj/project.pbxproj +++ b/StackScrollView.xcodeproj/project.pbxproj @@ -224,13 +224,14 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Don't Code Sign"; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = StackScrollView_Prefix.pch; - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "StackScrollView-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 3.2; PRODUCT_NAME = StackScrollView; @@ -242,10 +243,11 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = StackScrollView_Prefix.pch; - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "StackScrollView-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 3.2; PRODUCT_NAME = StackScrollView; diff --git a/main.m b/main.m index e8628a4..175ef20 100755 --- a/main.m +++ b/main.m @@ -40,8 +40,8 @@ int main(int argc, char *argv[]) { - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; + @autoreleasepool { + int retVal = UIApplicationMain(argc, argv, nil, nil); + return retVal; + } }