I’m trying to use TWTweetComposeViewController to do a simple tweet from iOS 5. It works if there is one text field, but how do you create a string of text from 3 UITextFields?
Here is the header text:
@property (nonatomic, strong) IBOutlet UITextField *theWorld;
@property (nonatomic, strong) IBOutlet UITextField *isGreen;
@property (nonatomic, strong) IBOutlet UITextField *andBeautiful;
And the implementation:
{
TWTweetComposeViewController *tweetSheet =
[[TWTweetComposeViewController alloc] init];
[tweetSheet setInitialText:
theWorld.text];
[self presentModalViewController:tweetSheet animated:YES];
}
Notice I only have one text field at the moment and it tweets that input text. I have no idea how tweet all 3 values from the UITextField at the same time.
Use the
+stringWithFormat:method ofNSString, passing in the values from your three text fields: