I installed ShareKit for Twitter Support in my app. I registered all keys and urls and so on. But my problem is: In my app the user sees sentences. I want that the user can tweet this sentence. What method do I have to write. I've got:
-(IBAction)tweetSentence {
NSString* message = [[sprueche objectAtIndex: spruecheCount] stringByAppendingString:@"\n\nhttp://projectkeecks.com"] ;
}
What do I have 开发者_如何学JAVAto add?
Thanks
Leon
Instead of [actionSheet showFromToolbar:navigationController.toolbar];
you can use [actionSheet showInView:self.view];
. You need not have a navigation controller in this case.
I found a tutorial on getsharekit.com But now I've got:
- (void)myButtonHandlerAction
{
// Create the item to share (in this example, a url)
NSString *someText = @"This is a blurb of text I highlighted from a document.";
SHKItem *item = [SHKItem text:someText];
// Get the ShareKit action sheet
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
// Display the action sheet
[actionSheet showFromToolbar:navigationController.toolbar];
}
But I've got no navigationController How can I do the "display the action sheet" part in the interface builder?
精彩评论