Permalink
Browse files

Don't attempt to call into the Settings.app anymore. It has been remo…

…ved in iOS 5.1


Closes #42
  • Loading branch information...
1 parent 88c7453 commit ef690ed3609d7bd65c700f2f0d8f826e7f34da32 @skabber skabber committed May 12, 2012
Showing with 6 additions and 13 deletions.
  1. +6 −13 DETweetComposeViewController/DETweetComposeViewController.m
@@ -172,8 +172,8 @@ + (void)displayNoTwitterAccountsAlert
UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"No Twitter Accounts", @"")
message:NSLocalizedString(@"There are no Twitter accounts configured. You can add or create a Twitter account in Settings.", @"")
delegate:self
- cancelButtonTitle:NSLocalizedString(@"Settings", @"")
- otherButtonTitles:NSLocalizedString(@"Cancel", @""), nil] autorelease];
+ cancelButtonTitle:NSLocalizedString(@"OK", @"")
+ otherButtonTitles:nil] autorelease];
alertView.tag = DETweetComposeViewControllerNoAccountsAlert;
[alertView show];
}
@@ -831,8 +831,8 @@ - (void)displayNoTwitterAccountsAlert
UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"No Twitter Accounts", @"")
message:NSLocalizedString(@"There are no Twitter accounts configured. You can add or create a Twitter account in Settings.", @"")
delegate:self
- cancelButtonTitle:NSLocalizedString(@"Settings", @"")
- otherButtonTitles:NSLocalizedString(@"Cancel", @""), nil] autorelease];
+ cancelButtonTitle:NSLocalizedString(@"OK", @"")
+ otherButtonTitles:nil] autorelease];
alertView.tag = DETweetComposeViewControllerNoAccountsAlert;
[alertView show];
}
@@ -1047,22 +1047,15 @@ - (IBAction)cancel
+ (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
// Notice this is a class method since we're displaying the alert from a class method.
{
- if (alertView.tag == DETweetComposeViewControllerNoAccountsAlert) {
- if (buttonIndex == 0) {
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];
- }
- }
+ // no op
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
// This gets called if there's an error sending the tweet.
{
if (alertView.tag == DETweetComposeViewControllerNoAccountsAlert) {
- [self dismissModalViewControllerAnimated:YES];
- if (buttonIndex == 0) {
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];
- }
+ // no op
}
else if (alertView.tag == DETweetComposeViewControllerCannotSendAlert) {
if (buttonIndex == 1) {

0 comments on commit ef690ed

Please sign in to comment.