0

在我的 iphone 应用程序中,我有一个 Twitter 页面,用户可以在其中更新他/她的状态。

在这里,问题是用户必须单击视图上的按钮(例如视图 A)并转到下一个视图(例如视图 B)。

在该视图(视图 B)上,模态视图随即出现,用户可以在其中添加他的身份验证详细信息,然后提交。

现在我希望模态视图应该出现在该视图(视图 A)上,而不是切换到另一个视图(视图 B)。

我该怎么办?

请帮助和建议

谢谢

4

1 回答 1

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/

于 2010-11-25T10:24:11.590 回答