Permalink
Browse files

Modernize catalog

  • Loading branch information...
soffes committed May 21, 2012
1 parent dfb898a commit 19aafd3c75d42f444aaef19a335e41d1d84aab37
View
@@ -1,9 +1,6 @@
[submodule "Vendor/AFNetworking"]
path = Vendor/AFNetworking
url = https://github.com/gowalla/AFNetworking.git
-[submodule "Vendor/JSONKit"]
- path = Vendor/JSONKit
- url = https://github.com/johnezang/JSONKit.git
[submodule "Vendor/SSToolkit"]
path = Vendor/SSToolkit
url = https://github.com/samsoffes/sstoolkit.git
@@ -27,11 +27,6 @@ + (NSString *)title {
- (void)dealloc {
_webView.delegate = nil;
- [_webView release];
- [_headerView release];
- [_titleLabel release];
- [_addressBar release];
- [super dealloc];
}
View
@@ -8,7 +8,7 @@
@interface SCAppDelegate : NSObject <UIApplicationDelegate>
-@property (nonatomic, retain) UIWindow *window;
-@property (nonatomic, retain) UINavigationController *navigationController;
+@property (nonatomic, strong) UIWindow *window;
+@property (nonatomic, strong) UINavigationController *navigationController;
@end
View
@@ -21,15 +21,6 @@ @implementation SCAppDelegate {
@synthesize navigationController = _navigationController;
-#pragma mark - NSObject
-
-- (void)dealloc {
- [_navigationController release];
- [_window release];
- [super dealloc];
-}
-
-
#pragma mark - UIApplicationDelegate
- (void)applicationDidFinishLaunching:(UIApplication *)application {
@@ -41,8 +32,6 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application {
self.navigationController = aNavigationController;
- [viewController release];
- [aNavigationController release];
[_window addSubview:_navigationController.view];
[_window makeKeyAndVisible];
@@ -63,7 +63,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
SSBadgeTableViewCell *cell = (SSBadgeTableViewCell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
- cell = [[[SSBadgeTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier] autorelease];
+ cell = [[SSBadgeTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier];
}
if (indexPath.section == 0) {
@@ -53,7 +53,7 @@ - (SSCollectionViewItem *)collectionView:(SSCollectionView *)aCollectionView ite
SCImageCollectionViewItem *item = (SCImageCollectionViewItem *)[aCollectionView dequeueReusableItemWithIdentifier:itemIdentifier];
if (item == nil) {
- item = [[[SCImageCollectionViewItem alloc] initWithReuseIdentifier:itemIdentifier] autorelease];
+ item = [[SCImageCollectionViewItem alloc] initWithReuseIdentifier:itemIdentifier];
}
CGFloat size = 80.0f * [[UIScreen mainScreen] scale];
@@ -72,7 +72,7 @@ - (UIView *)collectionView:(SSCollectionView *)aCollectionView viewForHeaderInSe
header.shadowColor = [UIColor whiteColor];
header.shadowOffset = CGSizeMake(0.0f, 1.0f);
header.backgroundColor = [UIColor colorWithWhite:1.0f alpha:0.8f];
- return [header autorelease];
+ return header;
}
@@ -89,7 +89,6 @@ - (void)collectionView:(SSCollectionView *)aCollectionView didSelectItemAtIndexP
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:nil delegate:nil
cancelButtonTitle:@"Oh, awesome!" otherButtonTitles:nil];
[alert show];
- [alert release];
}
@@ -21,14 +21,6 @@ + (NSString *)title {
}
-#pragma mark - NSObject
-
-- (void)dealloc {
- [_gradientView release];
- [super dealloc];
-}
-
-
#pragma mark - UIViewController
- (void)viewDidLoad {
@@ -62,7 +54,6 @@ - (void)viewDidLoad {
scaleSlider.maximumValue = 1.0f;
[scaleSlider addTarget:self action:@selector(updateScale:) forControlEvents:UIControlEventValueChanged];
[self.view addSubview:scaleSlider];
- [scaleSlider release];
_blue = YES;
}
@@ -20,14 +20,6 @@ + (NSString *)title {
}
-#pragma mark - NSObject
-
-- (void)dealloc {
- [_hud release];
- [super dealloc];
-}
-
-
#pragma mark - UIViewController
- (void)viewDidLoad {
@@ -8,7 +8,7 @@
@interface SCImageCollectionViewItem : SSCollectionViewItem
-@property (nonatomic, retain) NSURL *imageURL;
+@property (nonatomic, strong) NSURL *imageURL;
- (id)initWithReuseIdentifier:(NSString *)aReuseIdentifier;
@@ -16,8 +16,6 @@ @implementation SCImageCollectionViewItem
@synthesize imageURL = _imageURL;
- (void)setImageURL:(NSURL *)url {
- [url retain];
- [_imageURL release];
_imageURL = url;
if (_imageURL) {
@@ -28,14 +26,6 @@ - (void)setImageURL:(NSURL *)url {
}
-#pragma mark - NSObject
-
-- (void)dealloc {
- [_imageURL release];
- [super dealloc];
-}
-
-
#pragma mark - Initializer
- (id)initWithReuseIdentifier:(NSString *)aReuseIdentifier {
@@ -26,24 +26,20 @@ - (void)viewDidLoad {
SSLineView *lineView1 = [[SSLineView alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 280.0f, 2.0f)];
[self.view addSubview:lineView1];
- [lineView1 release];
SSLineView *lineView2 = [[SSLineView alloc] initWithFrame:CGRectMake(20.0f, 42.0f, 280.0f, 2.0f)];
lineView2.lineColor = [UIColor blueColor];
[self.view addSubview:lineView2];
- [lineView2 release];
SSLineView *lineView3 = [[SSLineView alloc] initWithFrame:CGRectMake(20.0f, 64.0f, 280.0f, 2.0f)];
lineView3.lineColor = [UIColor orangeColor];
lineView3.dashLengths = [NSArray arrayWithObjects:[NSNumber numberWithFloat:5.0f], [NSNumber numberWithFloat:2.0f], nil];
[self.view addSubview:lineView3];
- [lineView3 release];
SSLineView *lineView4 = [[SSLineView alloc] initWithFrame:CGRectMake(20.0f, 86.0f, 280.0f, 2.0f)];
lineView4.lineColor = [UIColor greenColor];
lineView4.dashLengths = [NSArray arrayWithObjects:[NSNumber numberWithFloat:2.0f], [NSNumber numberWithFloat:2.0f], nil];
[self.view addSubview:lineView4];
- [lineView4 release];
}
@@ -28,7 +28,6 @@ - (void)viewDidLoad {
SSLoadingView *loadingView = [[SSLoadingView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, size.width, size.height)];
[self.view addSubview:loadingView];
- [loadingView release];
}
@@ -8,7 +8,7 @@
@interface SCPickerDemoViewController : UITableViewController
-@property (nonatomic, retain) NSString *selectedAbbreviation;
+@property (nonatomic, strong) NSString *selectedAbbreviation;
+ (NSString *)title;
@@ -30,12 +30,6 @@ - (id)init {
}
-- (void)dealloc {
- [_selectedAbbreviation release];
- [super dealloc];
-}
-
-
#pragma mark - UIViewController
- (void)viewDidLoad {
@@ -76,7 +70,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier] autorelease];
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier];
}
cell.textLabel.text = @"Picker Value";
@@ -93,7 +87,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
SCPickerDetailViewController *viewController = [[SCPickerDetailViewController alloc] initWithStyle:UITableViewStyleGrouped];
viewController.selectedKey = self.selectedAbbreviation;
[self.navigationController pushViewController:viewController animated:YES];
- [viewController release];
}
@end
@@ -24,10 +24,7 @@ + (NSString *)title {
#pragma mark - NSObject
- (void)dealloc {
- [_progressView7 release];
[_timer invalidate];
- [_timer release];
- [super dealloc];
}
@@ -41,36 +38,29 @@ - (void)viewDidLoad {
SSPieProgressView *progressView1 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 55.0f, 55.0f)];
progressView1.progress = 0.25;
[self.view addSubview:progressView1];
- [progressView1 release];
SSPieProgressView *progressView2 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(95.0f, 20.0f, 55.0f, 55.0f)];
progressView2.progress = 0.50;
[self.view addSubview:progressView2];
- [progressView2 release];
SSPieProgressView *progressView3 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(170.0f, 20.0f, 55.0f, 55.0f)];
progressView3.progress = 0.75;
[self.view addSubview:progressView3];
- [progressView3 release];
SSPieProgressView *progressView4 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(245.0f, 20.0f, 55.0f, 55.0f)];
progressView4.progress = 1.0;
[self.view addSubview:progressView4];
- [progressView4 release];
SSPieProgressView *progressView5 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(20.0f, 95.0f, 130.0f, 130.0f)];
progressView5.progress = 0.33;
[self.view addSubview:progressView5];
- [progressView5 release];
SSPieProgressView *progressView6 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(170.0f, 95.0f, 130.0f, 130.0f)];
progressView6.progress = 0.66;
[self.view addSubview:progressView6];
- [progressView6 release];
_progressView7 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(95.0f, 245.0f, 130.0f, 130.0f)];
[self.view addSubview:_progressView7];
- [_progressView7 release];
_timer = [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(incrementProgress:) userInfo:nil repeats:YES];
}
@@ -22,14 +22,6 @@ @implementation SCRootViewController {
}
-#pragma mark - NSObject
-
-- (void)dealloc {
- [_viewControllers release];
- [super dealloc];
-}
-
-
#pragma mark - UIViewController
- (void)viewDidLoad {
@@ -93,7 +85,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]; }
Class klass = [[NSBundle mainBundle] classNamed:[[[_viewControllers objectAtIndex:indexPath.section] objectForKey:kClassesKey] objectAtIndex:indexPath.row]];
@@ -117,7 +109,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
Class klass = [[NSBundle mainBundle] classNamed:[[[_viewControllers objectAtIndex:indexPath.section] objectForKey:kClassesKey] objectAtIndex:indexPath.row]];
UIViewController *viewController = [[klass alloc] init];
[self.navigationController pushViewController:viewController animated:YES];
- [viewController release];
}
@end
Oops, something went wrong.

0 comments on commit 19aafd3

Please sign in to comment.