簡體   English   中英

在iOS 5.1中從應用程序打開Twitter設置

[英]Open Twitter settings from app in iOS 5.1

我正在我的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];

我不知道原因,但Apple已刪除設置應用程序URL方案。 是的它在iOS 5.0中工作但它在5.1中不起作用

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM