2010-11-23 31 views
0

在我的iPhone應用程序中,我有一個twitter頁面,用戶可以在其中更新他/她的狀態。如何將twitter api集成到iphone SDK中,使其所有功能都集成在一個視圖中

在這裏,問題是用戶必須點擊視圖上的按鈕(比如視圖A)並轉到下一個視圖(比如視圖B)。

在該視圖(視圖B)上,模式視圖出現在用戶可以添加其認證細節的地方,然後提交。

現在我希望modalview應該出現在該視圖(視圖A)上,而不是切換到另一個視圖(視圖B)。

我該怎麼辦?

請幫忙推薦

感謝

回答

0

可以查看 「A」 本身添加的功能。一旦完成添加所需的框架和類,您可以在按鈕操作方法中添加此代碼。

-(IBAction) showTwitter:(id)sender{ 
    UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine: _engine delegate: self];  
    if (controller) { 
     [self presentModalViewController: controller animated: YES]; 
    } 
    else { 
      //comes here when user has already keyed in His credentials 
      //can add code here 
    } 
} 

此鏈接可能對您有所幫助。 http://mobile.tutsplus.com/tutorials/iphone/twitter-api-iphone/

相關問題