Twitter OAuth iPhone和导航控制器
我是Objective-C和iPhone编程新手,所以请耐心听我说。我正在使用bengottlieb的TwitterOAuth引擎,我不知道如何从模式视图或导航控制器加载登录 这会将启动屏幕推入导航控制器,但不会发生其他情况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
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视图控制器推送到目标上