Permalink
Browse files

Converted to ARC

  • Loading branch information...
1 parent 1892cda commit 1e59851c4435eced58e8228539d2d29ea5af537f @lucascorrea committed Feb 14, 2013
Showing with 3 additions and 4 deletions.
  1. +1 −1 SCTwitter/SCTwitter/SCTwitter.h
  2. +2 −3 SCTwitter/SCTwitter/SCTwitter.m
View
2 SCTwitter/SCTwitter/SCTwitter.h
@@ -25,7 +25,7 @@
#import <Foundation/Foundation.h>
-#define Alert(title,msg) [[[[UIAlertView alloc] initWithTitle:title message:msg delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] autorelease] show];
+#define SCAlert(title,msg) [[[UIAlertView alloc] initWithTitle:title message:msg delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] show];
#define kTwitterData @"twitterData"
View
5 SCTwitter/SCTwitter/SCTwitter.m
@@ -174,11 +174,10 @@ - (void)loginViewControler:(UIViewController *)aViewController callback:(void (^
if (!_engine.consumerKey || !_engine.consumerSecret) {
NSString *error = @"Missing your application credentials ConsumerKey and ConsumerSecret. You cannot run the app until you provide this in the code.";
- Alert(@"ERROR", error);
+ SCAlert(@"ERROR", error);
if (aCallback) {
aCallback(NO);
- [aCallback release];
}
return;
}else {
@@ -193,7 +192,7 @@ - (void)loginViewControler:(UIViewController *)aViewController callback:(void (^
// Autorize twitter
self.loginCallback = aCallback;
UIViewController *twitterController = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];
- [aViewController presentModalViewController:twitterController animated: YES];
+ [aViewController presentViewController:twitterController animated:YES completion:nil];
}
}
}

0 comments on commit 1e59851

Please sign in to comment.