Skip to content

Instantly share code, notes, and snippets.

@AquaGeek
Created January 18, 2012 15:42
Show Gist options
  • Select an option

  • Save AquaGeek/1633603 to your computer and use it in GitHub Desktop.

Select an option

Save AquaGeek/1633603 to your computer and use it in GitHub Desktop.
Bug in iOS 5.0's TWTweetComposeViewController
- (void)showTweetSheet
{
TWTweetComposeViewController *composeVC = [[TWTweetComposeViewController alloc] init];
NSString *tweet = @"Hello, this is a message that is 117 characters long. Let's add a bunch more characters to see how long we can make i";
//!!! BUG: If you switch the order of these two calls, the URL will not get added.
BOOL urlAdded = [composeVC addURL:[NSURL URLWithString:@"http://developer.apple.com/library/ios"]];
BOOL textAdded = [composeVC setInitialText:tweet];
#pragma unused(urlAdded)
#pragma unused(textAdded)
[self presentModalViewController:composeVC animated:YES];
[composeVC release];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment