0

我在我的应用程序中安装了用于 Twitter 支持的 ShareKit。我注册了所有的密钥和网址等等。但我的问题是:在我的应用程序中,用户会看到句子。我希望用户可以在推特上发布这句话。我要写什么方法。我有:

-(IBAction)tweetSentence {

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

}

我要补充什么?

谢谢

莱昂

4

2 回答 2

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 如何在界面构建器中执行“显示操作表”部分?

于 2010-10-23T15:29:50.533 回答
0

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

于 2012-01-03T10:36:06.103 回答