0

ShareKit forTwitterSupportをアプリにインストールしました。すべてのキーとURLなどを登録しました。しかし、私の問題は次のとおりです。私のアプリでは、ユーザーに文章が表示されます。ユーザーがこの文章をツイートできるようにしたいと思います。どのような方法を書く必要がありますか。私が持っている:

-(IBAction)tweetSentence {

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

}

何を追加する必要がありますか?

ありがとう

レオン

4

2 に答える 2

0

代わりに [actionSheet showFromToolbar:navigationController.toolbar];を使用できます[actionSheet showInView:self.view];。この場合、ナビゲーション コントローラーは必要ありません。

于 2012-01-03T10:36:06.103 に答える
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 に答える