Skip to content
Browse files

Converted project to use ARC.

  • Loading branch information...
1 parent 0984c1e commit 15e317ca809ff8de1f3ec796a337b52a0aea930a Rafal Sroka committed Feb 15, 2014
View
4 SpriteAnimationDemo/SpriteAnimationDemo.xcodeproj/project.pbxproj
@@ -262,8 +262,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+ CLANG_ENABLE_OBJC_ARC = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SpriteAnimationDemo/SpriteAnimationDemo-Prefix.pch";
+ GCC_VERSION = "";
INFOPLIST_FILE = "SpriteAnimationDemo/SpriteAnimationDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -276,8 +278,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+ CLANG_ENABLE_OBJC_ARC = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SpriteAnimationDemo/SpriteAnimationDemo-Prefix.pch";
+ GCC_VERSION = "";
INFOPLIST_FILE = "SpriteAnimationDemo/SpriteAnimationDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
View
BIN ...o.xcodeproj/project.xcworkspace/xcuserdata/r3n.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
View
20 ...emo.xcodeproj/project.xcworkspace/xcuserdata/r3n.xcuserdatad/WorkspaceSettings.xcsettings
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>BuildLocationStyle</key>
+ <string>UseAppPreferences</string>
+ <key>CustomBuildLocationType</key>
+ <string>RelativeToDerivedData</string>
+ <key>DerivedDataLocationStyle</key>
+ <string>Default</string>
+ <key>IssueFilterStyle</key>
+ <string>ShowActiveSchemeOnly</string>
+ <key>LiveSourceIssuesEnabled</key>
+ <true/>
+ <key>SnapshotAutomaticallyBeforeSignificantChanges</key>
+ <true/>
+ <key>SnapshotLocationStyle</key>
+ <string>Default</string>
+</dict>
+</plist>
View
16 SpriteAnimationDemo/SpriteAnimationDemo/AppDelegate.m
@@ -33,26 +33,18 @@
@implementation AppDelegate
-@synthesize window = _window;
-@synthesize navigationController = _navigationController;
-
-- (void)dealloc
-{
- [_window release];
- [_navigationController release];
- [super dealloc];
-}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
- self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
- MasterViewController *masterViewController = [[[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil] autorelease];
- self.navigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease];
+ MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil];
+ self.navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
+
return YES;
}
View
25 SpriteAnimationDemo/SpriteAnimationDemo/MasterViewController.m
@@ -35,16 +35,6 @@
@implementation MasterViewController
-- (void)dealloc
-{
- [settingsView release];
- [locationLabel release];
- [lengthLabel release];
- [customRangeSwitch release];
- [super dealloc];
-}
-
-
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
@@ -63,20 +53,7 @@ - (void)viewDidLoad
}
-- (void)viewDidUnload
-{
- [imageView release];
- imageView = nil;
- [settingsView release];
- settingsView = nil;
- [locationLabel release];
- locationLabel = nil;
- [lengthLabel release];
- lengthLabel = nil;
- [customRangeSwitch release];
- customRangeSwitch = nil;
- [super viewDidUnload];
-}
+#pragma mark - Actions
- (IBAction)buttonAction:(id)sender
View
2 SpriteAnimationDemo/SpriteAnimationDemo/UIImage+Sprite/UIImage+Sprite.m
@@ -49,7 +49,7 @@ - (NSArray *)spritesWithSpriteSheetImage:(UIImage *)image
return nil;
CGImageRef spriteSheet = [image CGImage];
- NSMutableArray *tempArray = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *tempArray = [[NSMutableArray alloc] init];
int width = CGImageGetWidth(spriteSheet);
int height = CGImageGetHeight(spriteSheet);
View
2 UIImage+Sprite.m
@@ -49,7 +49,7 @@ - (NSArray *)spritesWithSpriteSheetImage:(UIImage *)image
return nil;
CGImageRef spriteSheet = [image CGImage];
- NSMutableArray *tempArray = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *tempArray = [[NSMutableArray alloc] init];
int width = CGImageGetWidth(spriteSheet);
int height = CGImageGetHeight(spriteSheet);

0 comments on commit 15e317c

Please sign in to comment.
Something went wrong with that request. Please try again.