Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter OAuth iPhone和导航控制器_Iphone_Twitter_Oauth_Uinavigationcontroller - Fatal编程技术网

Twitter OAuth iPhone和导航控制器

Twitter OAuth iPhone和导航控制器,iphone,twitter,oauth,uinavigationcontroller,Iphone,Twitter,Oauth,Uinavigationcontroller,我是Objective-C和iPhone编程新手,所以请耐心听我说。我正在使用bengottlieb的TwitterOAuth引擎,我不知道如何从模式视图或导航控制器加载登录 这会将启动屏幕推入导航控制器,但不会发生其他情况 SA_OAuthTwitterController *twitterVC = [[SA_OAuthTwitterController alloc] init]; [self.navigationController pushViewController:twitterVC

我是Objective-C和iPhone编程新手,所以请耐心听我说。我正在使用bengottlieb的TwitterOAuth引擎,我不知道如何从模式视图或导航控制器加载登录

这会将启动屏幕推入导航控制器,但不会发生其他情况

SA_OAuthTwitterController *twitterVC = [[SA_OAuthTwitterController alloc] init];
[self.navigationController pushViewController:twitterVC animated: YES];
。。所以我想我必须用这样的东西:

if(_engine)return;
    _engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
    _engine.consumerKey    = kOAuthConsumerKey;
    _engine.consumerSecret = kOAuthConsumerSecret;  

SA_OAuthTwitterController *twitterVC = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];
[self.navigationController pushViewController:twitterVC animated: YES];
什么都没用


任何帮助都将不胜感激。

在咨询Ben本人后,他说twitter引擎不是设计为从模式或导航视图加载的。我的Twitter登录页面不在主视图中,而是在一个单独的视图中,因此我使用NSNotifications将数据从第二个视图传递到在第一个视图中初始化的引擎。

如果_enginereReturn;,您确定下面的代码正在运行吗?在[self.navigationController pushViewController:twitterVC动画:是]上设置断点;查看其是否已执行。使用:if \u engine!=nil{……}好的,代码现在正在执行,但我在控制台中收到了这个警告:应用程序试图将nil视图控制器推送到目标上