在 iOS5 中使用 Twitter 框架提示登录警报? [英] Prompt login alert with Twitter framework in iOS5?

查看:45
本文介绍了在 iOS5 中使用 Twitter 框架提示登录警报?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

众所周知,从 iOS5 开始,就有了一个原生的 Twitter 框架,可以轻松地从您的应用发布推文.

As you all may know, since iOS5 there is a native Twitter framework which make it easy to post tweets from your app.

有没有办法提示警报,将用户转发到设置应用并要求输入用户名和密码?

Is there a way to prompt an alert that forwards the user to the settings app and ask for username and password?

我知道我可以用下面的代码解决这个问题:

I know that i could solve the problem with the following code:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];

但那是未记录的代码..

But thats undocumented code..

提前致谢

问候比利(我在 SO 上的第一篇文章)

Regards Billy (My first post on SO)

推荐答案

如果您设置了 Twitter 集成以在 Twitter 上发布帖子并且 iOS 检测到没有设置 Twitter 帐户,则不需要实施此功能它会自动为您执行此操作!

You don't need to implement this, if you set up your Twitter integration to make a post on Twitter and iOS detects that there is no Twitter account set up it will do this automatically for you!

这是我在 iOS 5.1 上的 iPhone 4S 上运行的一个应用程序的屏幕截图

This is a screenshot of one of my apps running on my iPhone 4S on iOS 5.1

删除首选项链接是指开发人员的自定义操作,如链接到您自己的首选项菜单.这并不适用,因为不仅 Twitter 是 iOS 5 的内置功能,而且弹出来通知您的 UIAlertView 也不是由开发人员处理的,它是 iOS 的自动功能.

The removal of Preferences links is in reference to custom actions by the developer, as in linking to your own preferences menu. This does not apply because not only is Twitter a built in function of iOS 5 but the UIAlertView that pops up to notify you isn't handled by the developer, it is an automatic function of iOS.

这篇关于在 iOS5 中使用 Twitter 框架提示登录警报?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆