我正在我的 iPhone 应用程序中实现 Twitter,如果用户没有设置任何 Twitter 帐户,我希望他能够从我的应用程序打开他的 Twitter 设置。在 iOS 5.1 中有什么办法可以做到这一点吗?
在 iOS 5.0 中,我们可以执行以下操作,但我还没有找到在 5.1 中执行此操作的方法
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];
最佳答案
试试这个..
TWTweetComposeViewController *ctrl = [[TWTweetComposeViewController alloc] init];
if ([ctrl respondsToSelector:@selector(alertView:clickedButtonAtIndex:)]) {
// Manually invoke the alert view button handler
[(id <UIAlertViewDelegate>)ctrl alertView:nil
clickedButtonAtIndex:0];
}
[ctrl release];
关于iphone - 在 iOS 5.1 中从应用程序打开 Twitter 设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9914673/