You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

6 years ago
  1. //
  2. // AboutGMEViewController.swift
  3. // GMERemittance
  4. //
  5. // Created by Sujal on 2/13/18.
  6. // Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import UIKit
  9. class AboutGMEViewController: UIViewController {
  10. let URLFacebookApp: String = "fb://profile/1129818613815224"
  11. let URLFacebookApp2: String = "fb://page/1129818613815224"
  12. let URLFacebookBrowser: String = "https://www.facebook.com/1129818613815224/"
  13. let URLLinkedInApp: String = "linkedin://company/gmeremit/"
  14. let URLLinkedInBrowser: String = "https://www.linkedin.com/company/gmeremit/"
  15. override func viewDidLoad() {
  16. super.viewDidLoad()
  17. setUpNavBar(id: 202, title: "")
  18. }
  19. override func didReceiveMemoryWarning() {
  20. super.didReceiveMemoryWarning()
  21. // Dispose of any resources that can be recreated.
  22. }
  23. @IBAction func checkForUpdate(_ sender: Any) {
  24. }
  25. @IBAction func openLinkedIn(_ sender: Any) {
  26. UIApplication.tryURL(urls: [self.URLLinkedInApp,
  27. self.URLLinkedInBrowser
  28. ])
  29. }
  30. @IBAction func openFacebook(_ sender: Any) {
  31. UIApplication.tryURL(urls: [self.URLFacebookApp,
  32. self.URLFacebookApp2,
  33. self.URLFacebookBrowser
  34. ])
  35. }
  36. }
  37. extension UIApplication {
  38. class func tryURL(urls: [String]) {
  39. let application = UIApplication.shared
  40. for url in urls {
  41. if application.canOpenURL(URL(string: url)!) {
  42. application.open(URL(string: url)!, options: [:], completionHandler: nil)
  43. return
  44. }
  45. }
  46. }
  47. }