2010-10-23 145 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];。在這種情況下,您不需要導航控制器。