我正在嘗試將Twitter和Facebook應用到我的應用中。因此,我在iOS中使用iOS中的集成方法來執行此操作。在iOS 6下,如果沒有配置Facebook或Twitter,會出現警報視圖以通知用戶他必須先配置帳戶才能使用Twitter或Facebook。報警視圖爲用戶提供了直接跳轉到Twitter或Facebook設置的選項。在iOS 7中,如果沒有配置帳戶,則不會顯示警報視圖以通知用戶。似乎在iOS 7下已被禁用。因此,我現在通知用戶自己,但是有沒有辦法將用戶直接指向像iOS 6之類的設置?或者我需要在iOS 7下更改我的代碼以獲取警報嗎?Twitter和Facebook整合iOS 7
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
{
SLComposeViewController *tweetSheet = [SLComposeViewController
composeViewControllerForServiceType:SLServiceTypeTwitter];
[tweetSheet setInitialText:@"Hello a Tweet"];
[self presentViewController:tweetSheet animated:YES completion:nil];
} else {
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
{
//inform the user that no account is configured with alarm view.
}
}
http://stackoverflow.com/questions/3113391/iphone-opening-application-preferences-panel-from-app – Janub