Twitter OAuth iPhone 和导航控制器
我是 Objective-C 和 iPhone 编程的新手,所以请耐心等待。我正在使用 bengottlieb 的 Twitter OAuth 引擎,但我不知道如何从模态视图加载登录或加载到导航控制器中。
这会将启动屏幕推入导航控制器,但不会发生其他任何事情。
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];
什么也不做)
任何帮助将不胜感激。
I'm new to Objective-C and iPhone programming so please bear with me. I am using the Twitter OAuth engine by bengottlieb and I can't figure out how to load the Login from a modal view or into a navigation controller.
This pushes the splash screen into the navigation controller but nothing else happens.
SA_OAuthTwitterController *twitterVC = [[SA_OAuthTwitterController alloc] init];
[self.navigationController pushViewController:twitterVC animated: YES];
.. so I'm thinking I have to use something like this:
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];
(which does nothing)
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在与 Ben 本人协商后,他表示 Twitter 引擎并非设计为从模式或导航视图加载。我的 Twitter 登录页面不在主视图上,而是在一个单独的视图上,因此我使用 NSNotifications 将数据从第二个视图传递到在第一个视图上初始化的引擎。
After consulting with Ben himself, he said the twitter engine is not designed to be loaded from a modal or navigation view. My Twitter login page is not on the main view, but on a separate view so I used NSNotifications to pass data from a second view to the engine initialized on the first view.