How to launch myapplication settings tab in settings app from my application in ipad

后端 未结 4 1583
梦谈多话
梦谈多话 2021-01-15 15:08

Is there any way to open myapplication settings tab directly from my application like what we will use to open twitter settings

([[UIApplication sharedAppli         


        
相关标签:
4条回答
  • 2021-01-15 15:43

    As of iOS 8:

    [[UIApplication sharedApplication] openURL:UIApplicationOpenSettingsURLString];
    

    I don't believe that opening the settings for any app other than your own (including the Twitter and Facebook configuration page) is supported.

    0 讨论(0)
  • 2021-01-15 15:44

    Avoid using the canSendTweet method to check before you tweet, just present the ViewController. Should work for the Social framework as well, if you are working with iOS6. Example below.

    TWTweetComposeViewController *tweetSheet = [[TWTweetComposeViewController alloc] init];
    [self presentModalViewController:tweetSheet animated:YES];
    
    //If the user doesn't have twitter enabled then an alertview will pop up giving them to option to go straight to settings.
    
    0 讨论(0)
  • 2021-01-15 15:50

    Just show the composer. If no FB Account is available, it will show an AlertView to go to Settings. Works in iOS 8

    var controller = SLComposeViewController(forServiceType: SLServiceTypeFacebook)
    controller.setInitialText("My Post")
    self.presentViewController(controller, animated: true, completion: nil)
    
    0 讨论(0)
  • 2021-01-15 16:00

    By showing the Facebook or Twitter composer with the standard iOS Social Framework, will present us an AlertView with an option to go directly to FB or Twitter Settings for the users if the accounts are not setup. So this will be helpful when you want to your user to login to them via the Settings app, if they haven't done so.

    Have tested this with iOS 6 in iPad with both FB and Twitter.

    0 讨论(0)
提交回复
热议问题