Permalink
Browse files

GREENHOUSE-529 converted project to use ARC

  • Loading branch information...
1 parent bf679cc commit 16978ba14399f9f2dc0921a2efb8d3dfaa76754d @royclarkson royclarkson committed Aug 9, 2012
Showing with 485 additions and 1,451 deletions.
  1. +11 −0 Greenhouse.xcodeproj/project.pbxproj
  2. +0 −3 Greenhouse/ActivityAlertView.h
  3. +7 −17 Greenhouse/ActivityAlertView.m
  4. +1 −13 Greenhouse/ActivityIndicatorTableViewCell.m
  5. +1 −1 Greenhouse/AuthorizeViewController.h
  6. +0 −9 Greenhouse/AuthorizeViewController.m
  7. +1 −1 Greenhouse/CustomNavigationBar.h
  8. +0 −10 Greenhouse/CustomNavigationBar.m
  9. +1 −1 Greenhouse/CustomTabBar.h
  10. +0 −10 Greenhouse/CustomTabBar.m
  11. +1 −1 Greenhouse/CustomToolbar.h
  12. +0 −10 Greenhouse/CustomToolbar.m
  13. +4 −15 Greenhouse/EGORefreshTableHeaderView.m
  14. +4 −4 Greenhouse/Event.h
  15. +0 −22 Greenhouse/Event.m
  16. +1 −4 Greenhouse/EventController.h
  17. +6 −23 Greenhouse/EventController.m
  18. +2 −2 Greenhouse/EventDescriptionViewController.h
  19. +0 −13 Greenhouse/EventDescriptionViewController.m
  20. +11 −11 Greenhouse/EventDetailsViewController.h
  21. +4 −33 Greenhouse/EventDetailsViewController.m
  22. +3 −3 Greenhouse/EventMapViewController.h
  23. +3 −17 Greenhouse/EventMapViewController.m
  24. +4 −4 Greenhouse/EventSession.h
  25. +0 −22 Greenhouse/EventSession.m
  26. +1 −4 Greenhouse/EventSessionController.h
  27. +36 −110 Greenhouse/EventSessionController.m
  28. +3 −3 Greenhouse/EventSessionDescriptionViewController.h
  29. +0 −13 Greenhouse/EventSessionDescriptionViewController.m
  30. +16 −16 Greenhouse/EventSessionDetailsViewController.h
  31. +4 −41 Greenhouse/EventSessionDetailsViewController.m
  32. +0 −8 Greenhouse/EventSessionLeader.m
  33. +12 −12 Greenhouse/EventSessionRateViewController.h
  34. +1 −27 Greenhouse/EventSessionRateViewController.m
  35. +3 −3 Greenhouse/EventSessionTweetsViewController.h
  36. +2 −22 Greenhouse/EventSessionTweetsViewController.m
  37. +2 −2 Greenhouse/EventSessionsByDayViewController.h
  38. +4 −22 Greenhouse/EventSessionsByDayViewController.m
  39. +1 −1 Greenhouse/EventSessionsConferenceFavoritesViewController.h
  40. +2 −15 Greenhouse/EventSessionsConferenceFavoritesViewController.m
  41. +3 −18 Greenhouse/EventSessionsCurrentViewController.m
  42. +1 −13 Greenhouse/EventSessionsFavoritesViewController.m
  43. +6 −6 Greenhouse/EventSessionsMenuViewController.h
  44. +6 −28 Greenhouse/EventSessionsMenuViewController.m
  45. +5 −5 Greenhouse/EventSessionsViewController.h
  46. +2 −17 Greenhouse/EventSessionsViewController.m
  47. +2 −2 Greenhouse/EventTweetsViewController.h
  48. +2 −19 Greenhouse/EventTweetsViewController.m
  49. +3 −3 Greenhouse/EventsMainViewController.h
  50. +4 −20 Greenhouse/EventsMainViewController.m
  51. +4 −0 Greenhouse/Greenhouse-Info.plist
  52. +5 −6 Greenhouse/GreenhouseAppDelegate.h
  53. +4 −24 Greenhouse/GreenhouseAppDelegate.m
  54. +1 −1 Greenhouse/InfoViewController.h
  55. +0 −13 Greenhouse/InfoViewController.m
  56. +2 −3 Greenhouse/LocationManager.h
  57. +5 −7 Greenhouse/LocationManager.m
  58. +1 −1 Greenhouse/LocationManagerDelegate.h
  59. +1 −4 Greenhouse/NavigationViewController.h
  60. +0 −11 Greenhouse/NavigationViewController.m
  61. +2 −2 Greenhouse/OAuthConsumer/NSMutableURLRequest+Parameters.m
  62. +4 −6 Greenhouse/OAuthConsumer/NSString+URLEncoding.m
  63. +5 −4 Greenhouse/OAuthConsumer/OAAsynchronousDataFetcher.h
  64. +16 −34 Greenhouse/OAuthConsumer/OAAsynchronousDataFetcher.m
  65. +2 −2 Greenhouse/OAuthConsumer/OAConsumer.h
  66. +1 −8 Greenhouse/OAuthConsumer/OAConsumer.m
  67. +0 −2 Greenhouse/OAuthConsumer/OADataFetcher.h
  68. +15 −7 Greenhouse/OAuthConsumer/OADataFetcher.m
  69. +1 −2 Greenhouse/OAuthConsumer/OAHMAC_SHA1SignatureProvider.m
  70. +4 −4 Greenhouse/OAuthConsumer/OAMutableURLRequest.h
  71. +15 −27 Greenhouse/OAuthConsumer/OAMutableURLRequest.m
  72. +2 −2 Greenhouse/OAuthConsumer/OARequestParameter.h
  73. +1 −8 Greenhouse/OAuthConsumer/OARequestParameter.m
  74. +2 −2 Greenhouse/OAuthConsumer/OAServiceTicket.h
  75. +1 −8 Greenhouse/OAuthConsumer/OAServiceTicket.m
  76. +2 −2 Greenhouse/OAuthConsumer/OAToken.h
  77. +0 −7 Greenhouse/OAuthConsumer/OAToken.m
  78. +13 −18 Greenhouse/OAuthConsumer/OAToken_KeychainExtensions.m
  79. +1 −1 Greenhouse/OAuthController.h
  80. +0 −9 Greenhouse/OAuthController.m
  81. +5 −9 Greenhouse/OAuthManager.h
  82. +36 −112 Greenhouse/OAuthManager.m
  83. +30 −0 Greenhouse/OAuthResponseDelegate.h
  84. +2 −2 Greenhouse/Profile.h
  85. +1 −9 Greenhouse/Profile.m
  86. +1 −4 Greenhouse/ProfileController.h
  87. +5 −21 Greenhouse/ProfileController.m
  88. +4 −4 Greenhouse/ProfileMainViewController.h
  89. +1 −21 Greenhouse/ProfileMainViewController.m
  90. +2 −2 Greenhouse/PullRefreshTableViewController.h
  91. +2 −14 Greenhouse/PullRefreshTableViewController.m
  92. +3 −3 Greenhouse/Tweet.h
  93. +0 −19 Greenhouse/Tweet.m
  94. +13 −13 Greenhouse/TweetDetailsViewController.h
  95. +1 −27 Greenhouse/TweetDetailsViewController.m
  96. +1 −1 Greenhouse/TweetTableViewCell.h
  97. +5 −29 Greenhouse/TweetTableViewCell.m
  98. +8 −8 Greenhouse/TweetViewController.h
  99. +2 −28 Greenhouse/TweetViewController.m
  100. +5 −5 Greenhouse/TweetsViewController.h
  101. +4 −25 Greenhouse/TweetsViewController.m
  102. +2 −5 Greenhouse/TwitterController.h
  103. +21 −58 Greenhouse/TwitterController.m
  104. +3 −3 Greenhouse/TwitterProfileImageDownloader.h
  105. +1 −18 Greenhouse/TwitterProfileImageDownloader.m
  106. +2 −2 Greenhouse/Venue.h
  107. +2 −17 Greenhouse/Venue.m
  108. +3 −4 Greenhouse/VenueAnnotation.h
  109. +10 −21 Greenhouse/VenueAnnotation.m
  110. +6 −6 Greenhouse/VenueDetailsViewController.h
  111. +1 −19 Greenhouse/VenueDetailsViewController.m
  112. +1 −1 Greenhouse/VenueRoom.h
  113. +0 −12 Greenhouse/VenueRoom.m
  114. +1 −1 Greenhouse/WebImageView.h
  115. +1 −20 Greenhouse/WebImageView.m
  116. +4 −4 Greenhouse/main.m
View
11 Greenhouse.xcodeproj/project.pbxproj
@@ -141,6 +141,7 @@
28860BE40F44EE6400985440 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
811BA5CF120C58E40045BB34 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+ 811F8CF015D1B4AB00208CA7 /* OAuthResponseDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OAuthResponseDelegate.h; sourceTree = "<group>"; };
819E443B11FF1FA600DBC0BB /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
81E42D5E15ADE82F001FA72D /* ActivityAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActivityAlertView.h; sourceTree = "<group>"; };
81E42D5F15ADE82F001FA72D /* ActivityAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ActivityAlertView.m; sourceTree = "<group>"; };
@@ -671,6 +672,7 @@
81E42DE415ADE82F001FA72D /* OAuthController.m */,
81E42DE515ADE82F001FA72D /* OAuthManager.h */,
81E42DE615ADE82F001FA72D /* OAuthManager.m */,
+ 811F8CF015D1B4AB00208CA7 /* OAuthResponseDelegate.h */,
81E42DE915ADE82F001FA72D /* ProfileController.h */,
81E42DEA15ADE82F001FA72D /* ProfileController.m */,
81E42DEB15ADE82F001FA72D /* ProfileControllerDelegate.h */,
@@ -1040,6 +1042,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1059,6 +1062,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1101,6 +1105,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1144,6 +1149,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1186,6 +1192,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1228,6 +1235,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1269,6 +1277,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1311,6 +1320,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1352,6 +1362,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
View
3 Greenhouse/ActivityAlertView.h
@@ -24,9 +24,6 @@
@interface ActivityAlertView : UIAlertView
-{
- UIActivityIndicatorView *_activityIndicatorView;
-}
- (id)initWithActivityMessage:(NSString *)message;
- (void)startAnimating;
View
24 Greenhouse/ActivityAlertView.m
@@ -25,14 +25,14 @@
@interface ActivityAlertView()
-@property (nonatomic, retain) UIActivityIndicatorView *activityIndicatorView;
+@property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView;
@end
@implementation ActivityAlertView
-@synthesize activityIndicatorView = _activityIndicatorView;
+@synthesize activityIndicatorView;
- (id)initWithActivityMessage:(NSString *)message
{
@@ -49,7 +49,7 @@ - (id)initWithTitle:(NSString *)title
{
self.activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
- CGRect frame = _activityIndicatorView.frame;
+ CGRect frame = activityIndicatorView.frame;
frame.origin.x = 140.0f - (frame.size.width / 2);
if (message)
@@ -61,34 +61,24 @@ - (id)initWithTitle:(NSString *)title
frame.origin.y = 15.0f;
}
- _activityIndicatorView.frame = frame;
+ activityIndicatorView.frame = frame;
- [self addSubview:_activityIndicatorView];
+ [self addSubview:activityIndicatorView];
}
return self;
}
- (void)startAnimating
{
- [_activityIndicatorView startAnimating];
+ [activityIndicatorView startAnimating];
[self show];
}
- (void)stopAnimating
{
[self dismissWithClickedButtonIndex:0 animated:NO];
- [_activityIndicatorView stopAnimating];
-}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [_activityIndicatorView release];
-
- [super dealloc];
+ [activityIndicatorView stopAnimating];
}
@end
View
14 Greenhouse/ActivityIndicatorTableViewCell.m
@@ -25,7 +25,7 @@
@interface ActivityIndicatorTableViewCell()
-@property (nonatomic, retain) UIActivityIndicatorView *activityIndicatorView;
+@property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView;
@end
@@ -75,16 +75,4 @@ - (void)setSelected:(BOOL)selected animated:(BOOL)animated
// Configure the view for the selected state
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [_activityIndicatorView release];
-
- [super dealloc];
-}
-
-
@end
View
2 Greenhouse/AuthorizeViewController.h
@@ -23,7 +23,7 @@
#import <UIKit/UIKit.h>
-@interface AuthorizeViewController : UIViewController { }
+@interface AuthorizeViewController : UIViewController
- (IBAction)actionAuthorize:(id)sender;
View
9 Greenhouse/AuthorizeViewController.m
@@ -50,13 +50,4 @@ - (void)viewDidUnload
[super viewDidUnload];
}
-
-#pragma mark -
-#pragma NSObject methods
-
-- (void)dealloc
-{
- [super dealloc];
-}
-
@end
View
2 Greenhouse/CustomNavigationBar.h
@@ -23,6 +23,6 @@
#import <UIKit/UIKit.h>
-@interface CustomNavigationBar : UINavigationBar { }
+@interface CustomNavigationBar : UINavigationBar
@end
View
10 Greenhouse/CustomNavigationBar.m
@@ -50,14 +50,4 @@ - (void)drawRect:(CGRect)rect
self.tintColor = color;
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [super dealloc];
-}
-
-
@end
View
2 Greenhouse/CustomTabBar.h
@@ -23,6 +23,6 @@
#import <UIKit/UIKit.h>
-@interface CustomTabBar : UITabBar { }
+@interface CustomTabBar : UITabBar
@end
View
10 Greenhouse/CustomTabBar.m
@@ -49,14 +49,4 @@ - (void)drawRect:(CGRect)rect
CGContextFillRect(context, rect);
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [super dealloc];
-}
-
-
@end
View
2 Greenhouse/CustomToolbar.h
@@ -23,6 +23,6 @@
#import <UIKit/UIKit.h>
-@interface CustomToolbar : UIToolbar { }
+@interface CustomToolbar : UIToolbar
@end
View
10 Greenhouse/CustomToolbar.m
@@ -61,14 +61,4 @@ - (void)drawRect:(CGRect)rect
}
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [super dealloc];
-}
-
-
@end
View
19 Greenhouse/EGORefreshTableHeaderView.m
@@ -34,10 +34,10 @@
@interface EGORefreshTableHeaderView()
-@property (nonatomic, retain) UILabel *lastUpdatedLabel;
-@property (nonatomic, retain) UILabel *statusLabel;
-@property (nonatomic, retain) CALayer *arrowImage;
-@property (nonatomic, retain) UIActivityIndicatorView *activityView;
+@property (nonatomic, strong) UILabel *lastUpdatedLabel;
+@property (nonatomic, strong) UILabel *statusLabel;
+@property (nonatomic, strong) CALayer *arrowImage;
+@property (nonatomic, strong) UIActivityIndicatorView *activityView;
@end
@@ -110,7 +110,6 @@ - (void)setLastUpdateLabel:(NSDate *)lastRefreshDate
[formatter setPMSymbol:@"PM"];
[formatter setDateFormat:@"MM/dd/yyyy hh:mm:a"];
lastUpdatedLabel.text = [NSString stringWithFormat:@"Last Updated: %@", [formatter stringFromDate:lastRefreshDate]];
- [formatter release];
}
- (void)setState:(EGOPullRefreshState)aState{
@@ -160,14 +159,4 @@ - (void)setState:(EGOPullRefreshState)aState{
_state = aState;
}
-- (void)dealloc
-{
- [activityView release];
- [statusLabel release];
- [arrowImage release];
- [lastUpdatedLabel release];
-
- [super dealloc];
-}
-
@end
View
8 Greenhouse/Event.h
@@ -24,17 +24,17 @@
#import "WebDataModel.h"
-@interface Event : NSObject <WebDataModel> { }
+@interface Event : NSObject <WebDataModel>
@property (nonatomic, copy) NSString *eventId;
@property (nonatomic, copy) NSString *title;
-@property (nonatomic, retain) NSDate *startTime;
-@property (nonatomic, retain) NSDate *endTime;
+@property (nonatomic, strong) NSDate *startTime;
+@property (nonatomic, strong) NSDate *endTime;
@property (nonatomic, copy) NSString *location;
@property (nonatomic, copy) NSString *description;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *hashtag;
@property (nonatomic, copy) NSString *groupName;
-@property (nonatomic, retain) NSArray *venues;
+@property (nonatomic, strong) NSArray *venues;
@end
View
22 Greenhouse/Event.m
@@ -58,11 +58,9 @@ - (NSArray *)processVenueData:(NSArray *)venuesJson
{
Venue *venue = [[Venue alloc] initWithDictionary:d];
[tmpVenues addObject:venue];
- [venue release];
}
NSArray *venuesArray = [NSArray arrayWithArray:tmpVenues];
- [tmpVenues release];
return venuesArray;
}
@@ -96,24 +94,4 @@ - (id)initWithDictionary:(NSDictionary *)dictionary
return self;
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [eventId release];
- [title release];
- [startTime release];
- [endTime release];
- [location release];
- [description release];
- [name release];
- [hashtag release];
- [groupName release];
- [venues release];
-
- [super dealloc];
-}
-
@end
View
5 Greenhouse/EventController.h
@@ -26,11 +26,8 @@
@interface EventController : OAuthController
-{
- id<EventControllerDelegate> _delegate;
-}
-@property (nonatomic, assign) id<EventControllerDelegate> delegate;
+@property (nonatomic, unsafe_unretained) id<EventControllerDelegate> delegate;
- (void)fetchEvents;
- (void)fetchEvents:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data;
View
29 Greenhouse/EventController.m
@@ -27,7 +27,7 @@
@implementation EventController
-@synthesize delegate = _delegate;
+@synthesize delegate;
#pragma mark -
@@ -43,8 +43,6 @@ - (void)fetchEvents
realm:OAUTH_REALM
signatureProvider:nil]; // use the default method, HMAC-SHA1
- [url release];
-
[request setHTTPMethod:@"GET"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
@@ -58,20 +56,17 @@ - (void)fetchEvents
didFailSelector:@selector(fetchEvents:didFailWithError:)];
[_dataFetcher start];
-
- [request release];
}
- (void)fetchEvents:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
{
- [_dataFetcher release];
_dataFetcher = nil;
NSString *responseBody = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
DLog(@"%@", responseBody);
- NSMutableArray *events = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *events = [[NSMutableArray alloc] init];
if (ticket.didSucceed)
{
@@ -83,39 +78,27 @@ - (void)fetchEvents:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
{
Event *event = [[Event alloc] initWithDictionary:d];
[events addObject:event];
- [event release];
}
}
else
{
[self request:ticket didNotSucceedWithDefaultMessage:@"A problem occurred while retrieving the event data."];
}
- [responseBody release];
-
- if ([_delegate respondsToSelector:@selector(fetchEventsDidFinishWithResults:)])
+ if ([delegate respondsToSelector:@selector(fetchEventsDidFinishWithResults:)])
{
- [_delegate fetchEventsDidFinishWithResults:events];
+ [delegate fetchEventsDidFinishWithResults:events];
}
}
- (void)fetchEvents:(OAServiceTicket *)ticket didFailWithError:(NSError *)error
{
[self request:ticket didFailWithError:error];
- if ([_delegate respondsToSelector:@selector(fetchEventsDidFailWithError:)])
+ if ([delegate respondsToSelector:@selector(fetchEventsDidFailWithError:)])
{
- [_delegate fetchEventsDidFailWithError:error];
+ [delegate fetchEventsDidFailWithError:error];
}
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [super dealloc];
-}
-
@end
View
4 Greenhouse/EventDescriptionViewController.h
@@ -26,7 +26,7 @@
@interface EventDescriptionViewController : DataViewController { }
-@property (nonatomic, retain) Event *event;
-@property (nonatomic, retain) IBOutlet UITextView *textView;
+@property (nonatomic, strong) Event *event;
+@property (nonatomic, strong) IBOutlet UITextView *textView;
@end
View
13 Greenhouse/EventDescriptionViewController.m
@@ -63,17 +63,4 @@ - (void)viewDidUnload
self.textView = nil;
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [event release];
- [textView release];
-
- [super dealloc];
-}
-
-
@end
View
22 Greenhouse/EventDetailsViewController.h
@@ -30,17 +30,17 @@
@class EventMapViewController;
-@interface EventDetailsViewController : DataViewController <UITableViewDataSource, UITableViewDelegate> { }
+@interface EventDetailsViewController : DataViewController <UITableViewDataSource, UITableViewDelegate>
-@property (nonatomic, retain) Event *event;
-@property (nonatomic, retain) IBOutlet UILabel *labelTitle;
-@property (nonatomic, retain) IBOutlet UILabel *labelDescription;
-@property (nonatomic, retain) IBOutlet UILabel *labelTime;
-@property (nonatomic, retain) IBOutlet UILabel *labelLocation;
-@property (nonatomic, retain) IBOutlet UITableView *tableViewMenu;
-@property (nonatomic, retain) EventDescriptionViewController *eventDescriptionViewController;
-@property (nonatomic, retain) EventSessionsMenuViewController *eventSessionsMenuViewController;
-@property (nonatomic, retain) EventTweetsViewController *eventTweetsViewController;
-@property (nonatomic, retain) EventMapViewController *eventMapViewController;
+@property (nonatomic, strong) Event *event;
+@property (nonatomic, strong) IBOutlet UILabel *labelTitle;
+@property (nonatomic, strong) IBOutlet UILabel *labelDescription;
+@property (nonatomic, strong) IBOutlet UILabel *labelTime;
+@property (nonatomic, strong) IBOutlet UILabel *labelLocation;
+@property (nonatomic, strong) IBOutlet UITableView *tableViewMenu;
+@property (nonatomic, strong) EventDescriptionViewController *eventDescriptionViewController;
+@property (nonatomic, strong) EventSessionsMenuViewController *eventSessionsMenuViewController;
+@property (nonatomic, strong) EventTweetsViewController *eventTweetsViewController;
+@property (nonatomic, strong) EventMapViewController *eventMapViewController;
@end
View
37 Greenhouse/EventDetailsViewController.m
@@ -29,7 +29,7 @@
@interface EventDetailsViewController()
-@property (nonatomic, retain) NSArray *arrayMenuItems;
+@property (nonatomic, strong) NSArray *arrayMenuItems;
@end
@@ -87,7 +87,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
if (cell == nil)
{
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdent] autorelease];
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdent];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.selectionStyle = UITableViewCellSelectionStyleGray;
}
@@ -131,7 +131,6 @@ - (void)refreshView
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"EEEE, MMMM d, YYYY"];
labelTime.text = [dateFormatter stringFromDate:event.startTime];
- [dateFormatter release];
}
// If start and end time are same day, show the times for the event
@@ -142,12 +141,9 @@ - (void)refreshView
[dateFormatter setDateFormat:@"EEE, MMM d, YYYY, h:mm a"];
NSString *formattedStartTime = [dateFormatter stringFromDate:event.startTime];
[dateFormatter setDateFormat:@"h:mm a"];
- NSString *formattedEndTime = [dateFormatter stringFromDate:event.endTime];
- [dateFormatter release];
-
+ NSString *formattedEndTime = [dateFormatter stringFromDate:event.endTime];
NSString *formattedTime = [[NSString alloc] initWithFormat:@"%@ - %@", formattedStartTime, formattedEndTime];
labelTime.text = formattedTime;
- [formattedTime release];
}
// if the times are days apart, display the date range for the event
@@ -157,12 +153,9 @@ - (void)refreshView
[dateFormatter setDateFormat:@"EEE, MMM d"];
NSString *formattedStartTime = [dateFormatter stringFromDate:event.startTime];
[dateFormatter setDateFormat:@"EEE, MMM d, YYYY"];
- NSString *formattedEndTime = [dateFormatter stringFromDate:event.endTime];
- [dateFormatter release];
-
+ NSString *formattedEndTime = [dateFormatter stringFromDate:event.endTime];
NSString *formattedTime = [[NSString alloc] initWithFormat:@"%@ - %@", formattedStartTime, formattedEndTime];
labelTime.text = formattedTime;
- [formattedTime release];
}
labelLocation.text = event.location;
@@ -208,26 +201,4 @@ - (void)viewDidUnload
self.eventMapViewController = nil;
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [arrayMenuItems release];
- [event release];
- [labelTitle release];
- [labelDescription release];
- [labelTime release];
- [labelLocation release];
- [tableViewMenu release];
- [eventDescriptionViewController release];
- [eventSessionsMenuViewController release];
- [eventTweetsViewController release];
- [eventMapViewController release];
-
- [super dealloc];
-}
-
-
@end
View
6 Greenhouse/EventMapViewController.h
@@ -33,8 +33,8 @@
NSMutableData *_receivedData;
}
-@property (nonatomic, retain) Event *event;
-@property (nonatomic, retain) IBOutlet MKMapView *mapViewLocation;
-@property (nonatomic, retain) VenueDetailsViewController *venueDetailsViewController;
+@property (nonatomic, strong) Event *event;
+@property (nonatomic, strong) IBOutlet MKMapView *mapViewLocation;
+@property (nonatomic, strong) VenueDetailsViewController *venueDetailsViewController;
@end
View
20 Greenhouse/EventMapViewController.m
@@ -29,8 +29,8 @@
@interface EventMapViewController()
-@property (nonatomic, retain) NSMutableArray *venueAnnotations;
-@property (nonatomic, retain) Event *currentEvent;
+@property (nonatomic, strong) NSMutableArray *venueAnnotations;
+@property (nonatomic, strong) Event *currentEvent;
- (void)reloadMapData;
@@ -66,7 +66,6 @@ - (void)reloadMapData
{
VenueAnnotation *annotation = [[VenueAnnotation alloc] initWithVenue:venue];
[self.venueAnnotations addObject:annotation];
- [annotation release];
// find the max and min lat,lng values to determine the bounds of the map
CLLocationDegrees lat = venue.location.coordinate.latitude;
@@ -153,7 +152,7 @@ - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnn
if (annotationView == nil)
{
- annotationView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:ident] autorelease];
+ annotationView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:ident];
annotationView.pinColor = MKPinAnnotationColorGreen;
annotationView.animatesDrop = YES;
annotationView.canShowCallout = YES;
@@ -213,17 +212,4 @@ - (void)viewDidUnload
self.venueDetailsViewController = nil;
}
-
-- (void)dealloc
-{
- [venueAnnotations release];
- [currentEvent release];
- [event release];
- [mapViewLocation release];
- [venueDetailsViewController release];
-
- [super dealloc];
-}
-
-
@end
View
8 Greenhouse/EventSession.h
@@ -31,14 +31,14 @@
@property (nonatomic, copy) NSString *number;
@property (nonatomic, copy) NSString *title;
-@property (nonatomic, retain) NSDate *startTime;
-@property (nonatomic, retain) NSDate *endTime;
+@property (nonatomic, strong) NSDate *startTime;
+@property (nonatomic, strong) NSDate *endTime;
@property (nonatomic, copy) NSString *description;
-@property (nonatomic, retain) NSArray *leaders;
+@property (nonatomic, strong) NSArray *leaders;
@property (nonatomic, copy) NSString *hashtag;
@property (nonatomic, assign) BOOL isFavorite;
@property (nonatomic, assign) double rating;
-@property (nonatomic, retain) VenueRoom *room;
+@property (nonatomic, strong) VenueRoom *room;
@property (nonatomic, assign, readonly) NSInteger leaderCount;
@property (nonatomic, copy, readonly) NSString *leaderDisplay;
View
22 Greenhouse/EventSession.m
@@ -85,12 +85,9 @@ - (NSArray *)processLeaderData:(NSArray *)leadersJson
{
EventSessionLeader *leader = [[EventSessionLeader alloc] initWithDictionary:d];
[tmpLeaders addObject:leader];
- [leader release];
}
NSArray *leadersArray = [NSArray arrayWithArray:tmpLeaders];
- [tmpLeaders release];
-
return leadersArray;
}
@@ -119,29 +116,10 @@ - (id)initWithDictionary:(NSDictionary *)dictionary
VenueRoom *venueRoom = [[VenueRoom alloc] initWithDictionary:[dictionary objectForKey:@"room"]];
self.room = venueRoom;
- [venueRoom release];
}
}
return self;
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [number release];
- [title release];
- [startTime release];
- [endTime release];
- [description release];
- [leaders release];
- [hashtag release];
- [room release];
-
- [super dealloc];
-}
-
@end
View
5 Greenhouse/EventSessionController.h
@@ -26,11 +26,8 @@
@interface EventSessionController : OAuthController
-{
- id<EventSessionControllerDelegate> _delegate;
-}
-@property (nonatomic, assign) id<EventSessionControllerDelegate> delegate;
+@property (nonatomic, unsafe_unretained) id<EventSessionControllerDelegate> delegate;
+ (BOOL)shouldRefreshFavorites;
View
146 Greenhouse/EventSessionController.m
@@ -29,7 +29,7 @@
@implementation EventSessionController
-@synthesize delegate = _delegate;
+@synthesize delegate;
#pragma mark -
#pragma mark Static methods
@@ -49,20 +49,15 @@ - (void)fetchCurrentSessionsByEventId:(NSString *)eventId;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"YYYY-MM-d"];
NSString *dateString = [dateFormatter stringFromDate:[NSDate date]];
- [dateFormatter release];
-
NSString *urlString = [[NSString alloc] initWithFormat:EVENT_SESSIONS_BY_DAY_URL, eventId, dateString];
NSURL *url = [[NSURL alloc] initWithString:urlString];
- [urlString release];
OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url
consumer:[OAuthManager sharedInstance].consumer
token:[OAuthManager sharedInstance].accessToken
realm:OAUTH_REALM
signatureProvider:nil]; // use the default method, HMAC-SHA1
- [url release];
-
[request setHTTPMethod:@"GET"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
@@ -76,21 +71,18 @@ - (void)fetchCurrentSessionsByEventId:(NSString *)eventId;
didFailSelector:@selector(fetchCurrentSessions:didFailWithError:)];
[_dataFetcher start];
-
- [request release];
}
- (void)fetchCurrentSessions:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
{
- [_dataFetcher release];
_dataFetcher = nil;
NSString *responseBody = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
DLog(@"%@", responseBody);
- NSMutableArray *arrayCurrentSessions = [[[NSMutableArray alloc] init] autorelease];
- NSMutableArray *arrayUpcomingSessions = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *arrayCurrentSessions = [[NSMutableArray alloc] init];
+ NSMutableArray *arrayUpcomingSessions = [[NSMutableArray alloc] init];
if (ticket.didSucceed)
{
@@ -129,33 +121,29 @@ - (void)fetchCurrentSessions:(OAServiceTicket *)ticket didFinishWithData:(NSData
[arrayUpcomingSessions addObject:session];
}
}
-
- [session release];
}
}
else
{
[self request:ticket didNotSucceedWithDefaultMessage:@"A problem occurred while retrieving the session data."];
}
-
- [responseBody release];
- if ([_delegate respondsToSelector:@selector(fetchCurrentSessionsDidFinishWithResults:upcomingSessions:)])
+ if ([delegate respondsToSelector:@selector(fetchCurrentSessionsDidFinishWithResults:upcomingSessions:)])
{
DLog(@"arrayCurrentSessions: %@", arrayCurrentSessions);
DLog(@"arrayUpcomingSessions: %@", arrayUpcomingSessions);
- [_delegate fetchCurrentSessionsDidFinishWithResults:arrayCurrentSessions upcomingSessions:arrayUpcomingSessions];
+ [delegate fetchCurrentSessionsDidFinishWithResults:arrayCurrentSessions upcomingSessions:arrayUpcomingSessions];
}
}
- (void)fetchCurrentSessions:(OAServiceTicket *)ticket didFailWithError:(NSError *)error
{
[self request:ticket didFailWithError:error];
- if ([_delegate respondsToSelector:@selector(fetchCurrentSessionsDidFailWithError:)])
+ if ([delegate respondsToSelector:@selector(fetchCurrentSessionsDidFailWithError:)])
{
- [_delegate fetchCurrentSessionsDidFailWithError:error];
+ [delegate fetchCurrentSessionsDidFailWithError:error];
}
}
@@ -165,19 +153,15 @@ - (void)fetchSessionsByEventId:(NSString *)eventId withDate:(NSDate *)eventDate;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"YYYY-MM-d"];
NSString *dateString = [dateFormatter stringFromDate:eventDate];
- [dateFormatter release];
NSString *urlString = [[NSString alloc] initWithFormat:EVENT_SESSIONS_BY_DAY_URL, eventId, dateString];
NSURL *url = [[NSURL alloc] initWithString:urlString];
- [urlString release];
OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url
consumer:[OAuthManager sharedInstance].consumer
token:[OAuthManager sharedInstance].accessToken
realm:OAUTH_REALM
signatureProvider:nil]; // use the default method, HMAC-SHA1
- [url release];
-
[request setHTTPMethod:@"GET"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
@@ -191,21 +175,18 @@ - (void)fetchSessionsByEventId:(NSString *)eventId withDate:(NSDate *)eventDate;
didFailSelector:@selector(fetchSessions:didFailWithError:)];
[_dataFetcher start];
-
- [request release];
}
- (void)fetchSessions:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
{
- [_dataFetcher release];
_dataFetcher = nil;
NSString *responseBody = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
DLog(@"%@", responseBody);
- NSMutableArray *arraySessions = [[[NSMutableArray alloc] init] autorelease];
- NSMutableArray *arrayTimes = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *arraySessions = [[NSMutableArray alloc] init];
+ NSMutableArray *arrayTimes = [[NSMutableArray alloc] init];
if (ticket.didSucceed)
{
@@ -225,46 +206,40 @@ - (void)fetchSessions:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
{
arrayBlock = [[NSMutableArray alloc] init];
[arraySessions addObject:arrayBlock];
- [arrayBlock release];
-
[arrayBlock addObject:session];
NSDate *date = [session.startTime copyWithZone:NULL];
[arrayTimes addObject:date];
- [date release];
}
else if ([sessionTime compare:session.startTime] == NSOrderedSame)
{
[arrayBlock addObject:session];
}
sessionTime = session.startTime;
- [session release];
}
}
else
{
[self request:ticket didNotSucceedWithDefaultMessage:@"A problem occurred while retrieving the session data."];
}
- [responseBody release];
-
- if ([_delegate respondsToSelector:@selector(fetchSessionsByDateDidFinishWithResults:andTimes:)])
+ if ([delegate respondsToSelector:@selector(fetchSessionsByDateDidFinishWithResults:andTimes:)])
{
DLog(@"arraySessions: %@", arraySessions);
DLog(@"arrayTimes: %@", arrayTimes);
- [_delegate fetchSessionsByDateDidFinishWithResults:arraySessions andTimes:arrayTimes];
+ [delegate fetchSessionsByDateDidFinishWithResults:arraySessions andTimes:arrayTimes];
}
}
- (void)fetchSessions:(OAServiceTicket *)ticket didFailWithError:(NSError *)error
{
[self request:ticket didFailWithError:error];
- if ([_delegate respondsToSelector:@selector(fetchSessionsByDateDidFailWithError:)])
+ if ([delegate respondsToSelector:@selector(fetchSessionsByDateDidFailWithError:)])
{
- [_delegate fetchSessionsByDateDidFailWithError:error];
+ [delegate fetchSessionsByDateDidFailWithError:error];
}
}
@@ -274,16 +249,13 @@ - (void)fetchFavoriteSessionsByEventId:(NSString *)eventId
NSString *urlString = [[NSString alloc] initWithFormat:EVENT_SESSIONS_FAVORITES_URL, eventId];
NSURL *url = [[NSURL alloc] initWithString:urlString];
- [urlString release];
OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url
consumer:[OAuthManager sharedInstance].consumer
token:[OAuthManager sharedInstance].accessToken
realm:OAUTH_REALM
signatureProvider:nil]; // use the default method, HMAC-SHA1
- [url release];
-
[request setHTTPMethod:@"GET"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
@@ -297,20 +269,17 @@ - (void)fetchFavoriteSessionsByEventId:(NSString *)eventId
didFailSelector:@selector(fetchFavoriteSessions:didFailWithError:)];
[_dataFetcher start];
-
- [request release];
}
- (void)fetchFavoriteSessions:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
{
- [_dataFetcher release];
_dataFetcher = nil;
NSString *responseBody = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
DLog(@"%@", responseBody);
- NSMutableArray *arraySessions = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *arraySessions = [[NSMutableArray alloc] init];
if (ticket.didSucceed)
{
@@ -321,47 +290,41 @@ - (void)fetchFavoriteSessions:(OAServiceTicket *)ticket didFinishWithData:(NSDat
for (NSDictionary *d in array)
{
EventSession *session = [[EventSession alloc] initWithDictionary:d];
- [arraySessions addObject:session];
- [session release];
+ [arraySessions addObject:session];
}
}
else
{
[self request:ticket didNotSucceedWithDefaultMessage:@"A problem occurred while retrieving the session data."];
}
-
- [responseBody release];
-
- if ([_delegate respondsToSelector:@selector(fetchFavoriteSessionsDidFinishWithResults:)])
+
+ if ([delegate respondsToSelector:@selector(fetchFavoriteSessionsDidFinishWithResults:)])
{
- [_delegate fetchFavoriteSessionsDidFinishWithResults:arraySessions];
+ [delegate fetchFavoriteSessionsDidFinishWithResults:arraySessions];
}
}
- (void)fetchFavoriteSessions:(OAServiceTicket *)ticket didFailWithError:(NSError *)error
{
[self request:ticket didFailWithError:error];
- if ([_delegate respondsToSelector:@selector(fetchFavoriteSessionsDidFailWithError:)])
+ if ([delegate respondsToSelector:@selector(fetchFavoriteSessionsDidFailWithError:)])
{
- [_delegate fetchFavoriteSessionsDidFailWithError:error];
+ [delegate fetchFavoriteSessionsDidFailWithError:error];
}
}
- (void)fetchConferenceFavoriteSessionsByEventId:(NSString *)eventId
{
NSString *urlString = [[NSString alloc] initWithFormat:EVENT_SESSIONS_CONFERENCE_FAVORITES_URL, eventId];
NSURL *url = [[NSURL alloc] initWithString:urlString];
- [urlString release];
OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url
consumer:[OAuthManager sharedInstance].consumer
token:[OAuthManager sharedInstance].accessToken
realm:OAUTH_REALM
signatureProvider:nil]; // use the default method, HMAC-SHA1
- [url release];
-
[request setHTTPMethod:@"GET"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
@@ -375,20 +338,17 @@ - (void)fetchConferenceFavoriteSessionsByEventId:(NSString *)eventId
didFailSelector:@selector(fetchConferenceFavoriteSessions:didFailWithError:)];
[_dataFetcher start];
-
- [request release];
}
- (void)fetchConferenceFavoriteSessions:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
{
- [_dataFetcher release];
_dataFetcher = nil;
NSString *responseBody = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
DLog(@"%@", responseBody);
- NSMutableArray *arraySessions = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *arraySessions = [[NSMutableArray alloc] init];
if (ticket.didSucceed)
{
@@ -399,30 +359,27 @@ - (void)fetchConferenceFavoriteSessions:(OAServiceTicket *)ticket didFinishWithD
for (NSDictionary *d in array)
{
EventSession *session = [[EventSession alloc] initWithDictionary:d];
- [arraySessions addObject:session];
- [session release];
+ [arraySessions addObject:session];
}
}
else
{
[self request:ticket didNotSucceedWithDefaultMessage:@"A problem occurred while retrieving the session data."];
}
- [responseBody release];
-
- if ([_delegate respondsToSelector:@selector(fetchConferenceFavoriteSessionsDidFinishWithResults:)])
+ if ([delegate respondsToSelector:@selector(fetchConferenceFavoriteSessionsDidFinishWithResults:)])
{
- [_delegate fetchConferenceFavoriteSessionsDidFinishWithResults:arraySessions];
+ [delegate fetchConferenceFavoriteSessionsDidFinishWithResults:arraySessions];
}
}
- (void)fetchConferenceFavoriteSessions:(OAServiceTicket *)ticket didFailWithError:(NSError *)error
{
[self request:ticket didFailWithError:error];
- if ([_delegate respondsToSelector:@selector(fetchConferenceFavoriteSessionsDidFailWithError:)])
+ if ([delegate respondsToSelector:@selector(fetchConferenceFavoriteSessionsDidFailWithError:)])
{
- [_delegate fetchConferenceFavoriteSessionsDidFailWithError:error];
+ [delegate fetchConferenceFavoriteSessionsDidFailWithError:error];
}
}
@@ -432,16 +389,13 @@ - (void)updateFavoriteSession:(NSString *)sessionNumber withEventId:(NSString *)
NSString *urlString = [[NSString alloc] initWithFormat:EVENT_SESSIONS_FAVORITE_URL, eventId, sessionNumber];
NSURL *url = [[NSURL alloc] initWithString:urlString];
- [urlString release];
OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url
consumer:[OAuthManager sharedInstance].consumer
token:[OAuthManager sharedInstance].accessToken
realm:OAUTH_REALM
signatureProvider:nil]; // use the default method, HMAC-SHA1
-
- [url release];
-
+
[request setHTTPMethod:@"PUT"];
DLog(@"%@", request);
@@ -454,13 +408,10 @@ - (void)updateFavoriteSession:(NSString *)sessionNumber withEventId:(NSString *)
didFailSelector:@selector(updateFavoriteSession:didFailWithError:)];
[_dataFetcher start];
-
- [request release];
}
- (void)updateFavoriteSession:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
{
- [_dataFetcher release];
_dataFetcher = nil;
NSString *responseBody = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
@@ -478,21 +429,19 @@ - (void)updateFavoriteSession:(OAServiceTicket *)ticket didFinishWithData:(NSDat
[self request:ticket didNotSucceedWithDefaultMessage:@"A problem occurred while updating the favorite."];
}
- [responseBody release];
-
- if ([_delegate respondsToSelector:@selector(updateFavoriteSessionDidFinishWithResults:)])
+ if ([delegate respondsToSelector:@selector(updateFavoriteSessionDidFinishWithResults:)])
{
- [_delegate updateFavoriteSessionDidFinishWithResults:isFavorite];
+ [delegate updateFavoriteSessionDidFinishWithResults:isFavorite];
}
}
- (void)updateFavoriteSession:(OAServiceTicket *)ticket didFailWithError:(NSError *)error
{
[self request:ticket didFailWithError:error];
- if ([_delegate respondsToSelector:@selector(updateFavoriteSessionDidFailWithError:)])
+ if ([delegate respondsToSelector:@selector(updateFavoriteSessionDidFailWithError:)])
{
- [_delegate updateFavoriteSessionDidFailWithError:error];
+ [delegate updateFavoriteSessionDidFailWithError:error];
}
}
@@ -503,33 +452,26 @@ - (void)rateSession:(NSString *)sessionNumber withEventId:(NSString *)eventId ra
NSString *urlString = [[NSString alloc] initWithFormat:EVENT_SESSION_RATING_URL, eventId, sessionNumber];
NSURL *url = [[NSURL alloc] initWithString:urlString];
- [urlString release];
OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url
consumer:[OAuthManager sharedInstance].consumer
token:[OAuthManager sharedInstance].accessToken
realm:OAUTH_REALM
signatureProvider:nil]; // use the default method, HMAC-SHA1
- [url release];
-
NSString *s = [comment stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
s = [s URLEncodedString];
NSString *postParams =[[NSString alloc] initWithFormat:@"value=%i&comment=%@", rating, s];
DLog(@"%@", postParams);
-
- NSData *putData = [[postParams dataUsingEncoding:NSUTF8StringEncoding] retain];
- [postParams release];
-
+ NSData *putData = [postParams dataUsingEncoding:NSUTF8StringEncoding];
NSString *putLength = [NSString stringWithFormat:@"%d", [putData length]];
[request setHTTPMethod:@"POST"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setValue:putLength forHTTPHeaderField:@"Content-Length"];
[request setHTTPBody:putData];
- [putData release];
DLog(@"%@", request);
@@ -541,20 +483,16 @@ - (void)rateSession:(NSString *)sessionNumber withEventId:(NSString *)eventId ra
didFailSelector:@selector(rateSession:didFailWithError:)];
[_dataFetcher start];
-
- [request release];
}
- (void)rateSession:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
{
- [_dataFetcher release];
_dataFetcher = nil;
[_activityAlertView stopAnimating];
self.activityAlertView = nil;
NSHTTPURLResponse *response = (NSHTTPURLResponse *)ticket.response;
-
NSString *responseBody = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
DLog(@"%@", responseBody);
@@ -563,9 +501,9 @@ - (void)rateSession:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
{
double rating = [responseBody doubleValue];
- if ([_delegate respondsToSelector:@selector(rateSessionDidFinishWithResults:)])
+ if ([delegate respondsToSelector:@selector(rateSessionDidFinishWithResults:)])
{
- [_delegate rateSessionDidFinishWithResults:rating];
+ [delegate rateSessionDidFinishWithResults:rating];
}
}
else
@@ -578,15 +516,12 @@ - (void)rateSession:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
- [alertView release];
}
else
{
[self request:ticket didNotSucceedWithDefaultMessage:@"A problem occurred while submitting the session rating."];
}
}
-
- [responseBody release];
}
- (void)rateSession:(OAServiceTicket *)ticket didFailWithError:(NSError *)error
@@ -596,19 +531,10 @@ - (void)rateSession:(OAServiceTicket *)ticket didFailWithError:(NSError *)error
[self request:ticket didFailWithError:error];
- if ([_delegate respondsToSelector:@selector(rateSessionDidFailWithError:)])
+ if ([delegate respondsToSelector:@selector(rateSessionDidFailWithError:)])
{
- [_delegate rateSessionDidFailWithError:error];
+ [delegate rateSessionDidFailWithError:error];
}
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [super dealloc];
-}
-
@end
View
6 Greenhouse/EventSessionDescriptionViewController.h
@@ -24,9 +24,9 @@
#import "EventSession.h"
-@interface EventSessionDescriptionViewController : DataViewController { }
+@interface EventSessionDescriptionViewController : DataViewController
-@property (nonatomic, retain) EventSession *session;
-@property (nonatomic, retain) IBOutlet UITextView *textViewDescription;
+@property (nonatomic, strong) EventSession *session;
+@property (nonatomic, strong) IBOutlet UITextView *textViewDescription;
@end
View
13 Greenhouse/EventSessionDescriptionViewController.m
@@ -63,17 +63,4 @@ - (void)viewDidUnload
self.textViewDescription = nil;
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [session release];
- [textViewDescription release];
-
- [super dealloc];
-}
-
-
@end
View
32 Greenhouse/EventSessionDetailsViewController.h
@@ -33,22 +33,22 @@
@interface EventSessionDetailsViewController : DataViewController <UITableViewDataSource, UITableViewDelegate, EventSessionControllerDelegate> { }
-@property (nonatomic, retain) Event *event;
-@property (nonatomic, retain) EventSession *session;
-@property (nonatomic, retain) NSArray *arrayMenuItems;
-@property (nonatomic, retain) IBOutlet UILabel *labelTitle;
-@property (nonatomic, retain) IBOutlet UILabel *labelLeader;
-@property (nonatomic, retain) IBOutlet UILabel *labelTime;
-@property (nonatomic, retain) IBOutlet UILabel *labelLocation;
-@property (nonatomic, retain) IBOutlet UIImageView *imageViewRating1;
-@property (nonatomic, retain) IBOutlet UIImageView *imageViewRating2;
-@property (nonatomic, retain) IBOutlet UIImageView *imageViewRating3;
-@property (nonatomic, retain) IBOutlet UIImageView *imageViewRating4;
-@property (nonatomic, retain) IBOutlet UIImageView *imageViewRating5;
-@property (nonatomic, retain) IBOutlet UITableView *tableViewMenu;
-@property (nonatomic, retain) EventSessionDescriptionViewController *sessionDescriptionViewController;
-@property (nonatomic, retain) EventSessionTweetsViewController *sessionTweetsViewController;
-@property (nonatomic, retain) EventSessionRateViewController *sessionRateViewController;
+@property (nonatomic, strong) Event *event;
+@property (nonatomic, strong) EventSession *session;
+@property (nonatomic, strong) NSArray *arrayMenuItems;
+@property (nonatomic, strong) IBOutlet UILabel *labelTitle;
+@property (nonatomic, strong) IBOutlet UILabel *labelLeader;
+@property (nonatomic, strong) IBOutlet UILabel *labelTime;
+@property (nonatomic, strong) IBOutlet UILabel *labelLocation;
+@property (nonatomic, strong) IBOutlet UIImageView *imageViewRating1;
+@property (nonatomic, strong) IBOutlet UIImageView *imageViewRating2;
+@property (nonatomic, strong) IBOutlet UIImageView *imageViewRating3;
+@property (nonatomic, strong) IBOutlet UIImageView *imageViewRating4;
+@property (nonatomic, strong) IBOutlet UIImageView *imageViewRating5;
+@property (nonatomic, strong) IBOutlet UITableView *tableViewMenu;
+@property (nonatomic, strong) EventSessionDescriptionViewController *sessionDescriptionViewController;
+@property (nonatomic, strong) EventSessionTweetsViewController *sessionTweetsViewController;
+@property (nonatomic, strong) EventSessionRateViewController *sessionRateViewController;
- (void)updateRating:(double)newRating;
View
45 Greenhouse/EventSessionDetailsViewController.m
@@ -32,8 +32,8 @@
@interface EventSessionDetailsViewController()
-@property (nonatomic, retain) EventSessionController *eventSessionController;
-@property (nonatomic, retain) ActivityIndicatorTableViewCell *favoriteTableViewCell;
+@property (nonatomic, strong) EventSessionController *eventSessionController;
+@property (nonatomic, strong) ActivityIndicatorTableViewCell *favoriteTableViewCell;
- (void)setRating:(double)rating imageView:(UIImageView *)imageView;
- (void)updateFavoriteSession;
@@ -113,8 +113,6 @@ - (void)updateFavoriteSession
- (void)updateFavoriteSessionDidFinishWithResults:(BOOL)isFavorite
{
[favoriteTableViewCell stopAnimating];
-
- [eventSessionController release];
self.eventSessionController = nil;
session.isFavorite = isFavorite;
@@ -124,8 +122,6 @@ - (void)updateFavoriteSessionDidFinishWithResults:(BOOL)isFavorite
- (void)updateFavoriteSessionDidFailWithError:(NSError *)error
{
[favoriteTableViewCell stopAnimating];
-
- [eventSessionController release];
self.eventSessionController = nil;
}
@@ -173,7 +169,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
if (cell == nil)
{
- self.favoriteTableViewCell = [[[ActivityIndicatorTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:activityCellIdent] autorelease];
+ self.favoriteTableViewCell = [[ActivityIndicatorTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:activityCellIdent];
cell = favoriteTableViewCell;
}
}
@@ -183,7 +179,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
if (cell == nil)
{
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdent] autorelease];
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdent];
}
}
@@ -240,17 +236,12 @@ - (void)refreshView
[dateFormatter setDateFormat:@"h:mm a"];
NSString *formattedStartTime = [dateFormatter stringFromDate:session.startTime];
NSString *formattedEndTime = [dateFormatter stringFromDate:session.endTime];
- [dateFormatter release];
-
NSString *formattedTime = [[NSString alloc] initWithFormat:@"%@ - %@", formattedStartTime, formattedEndTime];
labelTime.text = formattedTime;
- [formattedTime release];
-
labelLocation.text = session.room.label;
NSArray *items = [[NSArray alloc] initWithObjects:@"Description", @"Tweets", @"Favorite", @"Rate", nil];
self.arrayMenuItems = items;
- [items release];
[tableViewMenu reloadData];
@@ -302,32 +293,4 @@ - (void)viewDidUnload
self.sessionRateViewController = nil;
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [favoriteTableViewCell release];
- [event release];
- [session release];
- [arrayMenuItems release];
- [labelTitle release];
- [labelLeader release];
- [labelTime release];
- [labelLocation release];
- [imageViewRating1 release];
- [imageViewRating2 release];
- [imageViewRating3 release];
- [imageViewRating4 release];
- [imageViewRating5 release];
- [tableViewMenu release];
- [sessionDescriptionViewController release];
- [sessionTweetsViewController release];
- [sessionRateViewController release];
-
- [super dealloc];
-}
-
-
@end
View
8 Greenhouse/EventSessionLeader.m
@@ -61,12 +61,4 @@ - (NSString *)description
return self.displayName;
}
-- (void)dealloc
-{
- [firstName release];
- [lastName release];
-
- [super dealloc];
-}
-
@end
View
24 Greenhouse/EventSessionRateViewController.h
@@ -31,18 +31,18 @@
@interface EventSessionRateViewController : UIViewController <EventSessionControllerDelegate, UITextViewDelegate> { }
-@property (nonatomic, retain) Event *event;
-@property (nonatomic, retain) EventSession *session;
-@property (nonatomic, retain) EventSessionDetailsViewController *sessionDetailsViewController;
-@property (nonatomic, retain) IBOutlet UIButton *buttonRating1;
-@property (nonatomic, retain) IBOutlet UIButton *buttonRating2;
-@property (nonatomic, retain) IBOutlet UIButton *buttonRating3;
-@property (nonatomic, retain) IBOutlet UIButton *buttonRating4;
-@property (nonatomic, retain) IBOutlet UIButton *buttonRating5;
-@property (nonatomic, retain) IBOutlet UITextView *textViewComments;
-@property (nonatomic, retain) IBOutlet UIBarButtonItem *barButtonCancel;
-@property (nonatomic, retain) IBOutlet UIBarButtonItem *barButtonSubmit;
-@property (nonatomic, retain) IBOutlet UIBarButtonItem *barButtonCount;
+@property (nonatomic, strong) Event *event;
+@property (nonatomic, strong) EventSession *session;
+@property (nonatomic, strong) EventSessionDetailsViewController *sessionDetailsViewController;
+@property (nonatomic, strong) IBOutlet UIButton *buttonRating1;
+@property (nonatomic, strong) IBOutlet UIButton *buttonRating2;
+@property (nonatomic, strong) IBOutlet UIButton *buttonRating3;
+@property (nonatomic, strong) IBOutlet UIButton *buttonRating4;
+@property (nonatomic, strong) IBOutlet UIButton *buttonRating5;
+@property (nonatomic, strong) IBOutlet UITextView *textViewComments;
+@property (nonatomic, strong) IBOutlet UIBarButtonItem *barButtonCancel;
+@property (nonatomic, strong) IBOutlet UIBarButtonItem *barButtonSubmit;
+@property (nonatomic, strong) IBOutlet UIBarButtonItem *barButtonCount;
- (IBAction)actionSelectRating:(id)sender;
- (IBAction)actionCancel:(id)sender;
View
28 Greenhouse/EventSessionRateViewController.m
@@ -30,7 +30,7 @@
@interface EventSessionRateViewController()
-@property (nonatomic, retain) EventSessionController *eventSessionController;
+@property (nonatomic, strong) EventSessionController *eventSessionController;
@property (nonatomic, assign) NSUInteger rating;
- (void)updateRatingButtons:(NSInteger)count;
@@ -147,7 +147,6 @@ - (void)updateCharacterCount:(NSInteger)newCount
NSInteger remainingChars = MAX_MESSAGE_SIZE - newCount;
NSString *s = [[NSString alloc] initWithFormat:@"%i", remainingChars];
barButtonCount.title = s;
- [s release];
if (remainingChars < 0)
{
@@ -174,7 +173,6 @@ - (void)textViewDidChange:(UITextView *)textView
- (void)rateSessionDidFinishWithResults:(double)newRating
{
- [eventSessionController release];
self.eventSessionController = nil;
session.rating = newRating;
@@ -185,7 +183,6 @@ - (void)rateSessionDidFinishWithResults:(double)newRating
- (void)rateSessionDidFailWithError:(NSError *)error
{
- [eventSessionController release];
self.eventSessionController = nil;
}
@@ -239,27 +236,4 @@ - (void)viewDidUnload
self.barButtonCount = nil;
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [event release];
- [session release];
- [sessionDetailsViewController release];
- [barButtonCancel release];
- [barButtonSubmit release];
- [buttonRating1 release];
- [buttonRating2 release];
- [buttonRating3 release];
- [buttonRating4 release];
- [buttonRating5 release];
- [textViewComments release];
- [barButtonCount release];
-
- [super dealloc];
-}
-
-
@end
View
6 Greenhouse/EventSessionTweetsViewController.h
@@ -26,9 +26,9 @@
#import "EventSession.h"
-@interface EventSessionTweetsViewController : TweetsViewController { }
+@interface EventSessionTweetsViewController : TweetsViewController
-@property (nonatomic, retain) Event *event;
-@property (nonatomic, retain) EventSession *session;
+@property (nonatomic, strong) Event *event;
+@property (nonatomic, strong) EventSession *session;
@end
View
24 Greenhouse/EventSessionTweetsViewController.m
@@ -25,12 +25,11 @@
@interface EventSessionTweetsViewController()
-@property (nonatomic, retain) EventSession *currentSession;
+@property (nonatomic, strong) EventSession *currentSession;
@end
-
@implementation EventSessionTweetsViewController
@synthesize event;
@@ -44,21 +43,15 @@ - (void)refreshView
{
NSString *urlString = [[NSString alloc] initWithFormat:EVENT_SESSION_TWEETS_URL, event.eventId, session.number];
NSURL *url = [[NSURL alloc] initWithString:urlString];
- [urlString release];
self.tweetUrl = url;
- [url release];
-
self.tweetViewController.tweetUrl = url;
NSString *tweetText = [[NSString alloc] initWithFormat:@"%@ %@", event.hashtag, session.hashtag];
self.tweetViewController.tweetText = tweetText;
- [tweetText release];
- urlString = [[NSString alloc] initWithFormat:EVENT_SESSION_RETWEET_URL, event.eventId, session.number];
+ urlString = [[NSString alloc] initWithFormat:EVENT_SESSION_RETWEET_URL, event.eventId, session.number];
url = [[NSURL alloc] initWithString:urlString];
- [urlString release];
self.retweetUrl = url;
- [url release];
if (![currentSession.number isEqualToString:session.number])
{
@@ -90,17 +83,4 @@ - (void)viewDidUnload
self.currentSession = nil;
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [event release];
- [session release];
- [currentSession release];
-
- [super dealloc];
-}
-
@end
View
4 Greenhouse/EventSessionsByDayViewController.h
@@ -25,8 +25,8 @@
#import "EventSessionController.h"
-@interface EventSessionsByDayViewController : EventSessionsViewController <EventSessionControllerDelegate> { }
+@interface EventSessionsByDayViewController : EventSessionsViewController <EventSessionControllerDelegate>
-@property (nonatomic, retain) NSDate *eventDate;
+@property (nonatomic, strong) NSDate *eventDate;
@end
View
26 Greenhouse/EventSessionsByDayViewController.m
@@ -25,9 +25,9 @@
@interface EventSessionsByDayViewController()
-@property (nonatomic, retain) EventSessionController *eventSessionController;
-@property (nonatomic, retain) NSArray *arrayTimes;
-@property (nonatomic, retain) NSDate *currentEventDate;
+@property (nonatomic, strong) EventSessionController *eventSessionController;
+@property (nonatomic, strong) NSArray *arrayTimes;
+@property (nonatomic, strong) NSDate *currentEventDate;
- (void)completeFetchSessions:(NSArray *)sessions andTimes:(NSArray *)times;
@@ -63,7 +63,6 @@ - (EventSession *)eventSessionForIndexPath:(NSIndexPath *)indexPath
- (void)completeFetchSessions:(NSArray *)sessions andTimes:(NSArray *)times
{
- [eventSessionController release];
self.eventSessionController = nil;
self.arraySessions = sessions;
self.arrayTimes = times;
@@ -84,7 +83,6 @@ - (void)fetchSessionsByDateDidFailWithError:(NSError *)error
{
NSArray *array = [[NSArray alloc] init];
[self completeFetchSessions:array andTimes:array];
- [array release];
}
@@ -126,8 +124,7 @@ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInte
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"h:mm a"];
NSString *dateString = [dateFormatter stringFromDate:sessionTime];
- [dateFormatter release];
- s = dateString;
+ s = dateString;
}
return s;
@@ -143,7 +140,6 @@ - (void)refreshView
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"EEEE"];
NSString *dateString = [dateFormatter stringFromDate:eventDate];
- [dateFormatter release];
self.title = dateString;
if (![self.currentEvent.eventId isEqualToString:self.event.eventId] ||
@@ -199,18 +195,4 @@ - (void)viewDidUnload
self.eventDate = nil;
}
-
-#pragma mark -
-#pragma mark NSObject methods
-
-- (void)dealloc
-{
- [arrayTimes release];
- [currentEventDate release];
- [eventDate release];
-
- [super dealloc];
-}
-
-
@end
View
2 Greenhouse/EventSessionsConferenceFavoritesViewController.h
@@ -25,6 +25,6 @@
#import "EventSessionController.h"
-@interface EventSessionsConferenceFavoritesViewController : EventSessionsViewController <EventSessionControllerDelegate> { }
+@interface EventSessionsConferenceFavoritesViewController : EventSessionsViewController <EventSessionControllerDelegate>
@end
View
17 Greenhouse/EventSessionsConferenceFavoritesViewController.m
@@ -25,7 +25,7 @@
@interface EventSessionsConferenceFavoritesViewController()
-@property (nonatomic, retain) EventSessionController *eventSessionController;
+@property (nonatomic, strong) EventSessionController *eventSessionController;
- (void)completeFetchConferenceFavoriteSessions:(NSArray *)sessions;
@@ -38,7 +38,6 @@ @implementation EventSessionsConferenceFavoritesViewController
- (void)completeFetchConferenceFavoriteSessions:(NSArray *)sessions
{
- [eventSessionController release];
self.eventSessionController = nil;
self.arraySessions = sessions;
[self.tableView reloadData];
@@ -57,7 +56,6 @@ - (void)fetchConferenceFavoriteSessionsDidFailWithError:(NSError *)error
{
NSArray *array = [[NSArray alloc] init];
[self completeFetchConferenceFavoriteSessions:array];
- [array release];
}