Created
January 18, 2012 15:42
-
-
Save AquaGeek/1633603 to your computer and use it in GitHub Desktop.
Bug in iOS 5.0's TWTweetComposeViewController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (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