我正在使用Twitter與IOS-5集成。我用這個蘋果提供的tweeting應用程序。我爲此使用了TWTweetComposeViewController。在IOS-5中獲取Twitter帳戶列表並用TWTweetComposeViewController將其用戶
但是,如果我有超過2個Twitter帳戶。它每次都得到我的第一個帳戶。但我希望顯示給我的不同帳戶的列表,然後當我選擇一個帳戶,然後我可以將它與TWTweetComposeViewController一起使用。我想展現像波紋圖像來源:
我已經使用這個代碼 「用戶名」:
- (IBAction)sendEasyTweet:(id)sender {
// Set up the built-in twitter composition view controller.
TWTweetComposeViewController *tweetViewController = [[TWTweetComposeViewController alloc] init];
// Set the initial tweet text. See the framework for additional properties that can be set.
[tweetViewController setInitialText:@"Hello. This is a tweet."];
[tweetViewController addImage:[UIImage imageNamed:@"Icon.png"]];
// Create the completion handler block.
[tweetViewController setCompletionHandler:^(TWTweetComposeViewControllerResult result) {
NSString *output;
switch (result) {
case TWTweetComposeViewControllerResultCancelled:
// The cancel button was tapped.
output = @"Tweet cancelled.";
break;
case TWTweetComposeViewControllerResultDone:
// The tweet was sent.
output = @"Tweet done.";
break;
default:
break;
}
[self performSelectorOnMainThread:@selector(displayText:) withObject:output waitUntilDone:NO];
// Dismiss the tweet composition view controller.
[self dismissModalViewControllerAnimated:YES];
}];
// Present the tweet composition view controller modally.
[self presentModalViewController:tweetViewController animated:YES];
}