我正在我的应用程序中实现 Twitter 集成。但setinitialtext 显示空对话框。
我的代码是:
TWTweetComposeViewController *tweetSheet =
[[TWTweetComposeViewController alloc] init];
if ([TWTweetComposeViewController canSendTweet])
{
NSString *tw=[[NSString stringWithFormat:@"AT %@ %@ \n on %@\n %@ %@ %@ vs %@",lbl_vanueName.text,lbl_address.text,[arr_eventDate objectAtIndex:0],[arr_eventName objectAtIndex:0],[arr_EventType objectAtIndex:0],[arr_Contestant1 objectAtIndex:0],[arr_Contestant2 objectAtIndex:0]] retain];
NSLog(@" tw is:%@",tw); // work fine & got all values
[tweetSheet setInitialText:tw];
}