Open Twitter settings in Settings app

后端 未结 6 1745
野的像风
野的像风 2020-12-28 09:02

I know I can open the settings app in iOS 5 using

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@\"prefs://\"]];

but is

6条回答
  •  爱一瞬间的悲伤
    2020-12-28 09:36

    Just show the composer. If no Twitter Account is available, it will show an AlertView to go to Settings

    var controller = SLComposeViewController(forServiceType: SLServiceTypeTwitter)
    controller.setInitialText("My Post")
    self.presentViewController(controller, animated: true, completion: nil)
    

提交回复
热议问题