iOS 如何从应用内的其他应用打开应用

How to open app from other app within app in iOS

如何在 iOS 中从一个应用程序移动到另一个应用程序。
如果当时设备中存在应用程序,如何从一个应用程序转到另一个应用程序。

let url = NSURL(string: "NameOfTheAppAsOnAppStrore:")
 // canOpenURL will return a bool value checking the presence of app in your device and if app is present, it will open the same.
if UIApplication.sharedApplication().canOpenURL(url!)
      UIApplication.sharedApplication().openURL(url!)
}