2010-10-23 135 views
0

我在我的应用程序中安装了ShareKit for Twitter支持。我注册了所有的钥匙和网址等等。但我的问题是:在我的应用程序中,用户会看到句子。我希望用户可以发布这个句子。我必须写什么方法。我有:ShareKit Twitter集成

-(IBAction)tweetSentence { 

NSString* message = [[sprueche objectAtIndex: spruecheCount] stringByAppendingString:@"\n\nhttp://projectkeecks.com"] ; 

} 

我需要添加什么?

感谢

莱昂

回答

0

我发现了一个教程getsharekit.com 但现在我已经得到了:

- (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]; 
} 

但我没有navigationController 我该怎么办了在界面生成器中显示“操作表”部分?

0

而不是[actionSheet showFromToolbar:navigationController.toolbar];你可以使用[actionSheet showInView:self.view];。在这种情况下,您不需要导航控制器。