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.
 
 
 
 

64 lines
1.9 KiB

//
// AboutGMEViewController.swift
// GMERemittance
//
// Created by Sujal on 2/13/18.
// Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
//
import UIKit
class AboutGMEViewController: UIViewController {
let URLFacebookApp: String = "fb://profile/1129818613815224"
let URLFacebookApp2: String = "fb://page/1129818613815224"
let URLFacebookBrowser: String = "https://www.facebook.com/1129818613815224/"
let URLLinkedInApp: String = "linkedin://company/gmeremit/"
let URLLinkedInBrowser: String = "https://www.linkedin.com/company/gmeremit/"
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.setupNormalNavigation()
self.navigationItem.title = "About Gme"
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func checkForUpdate(_ sender: Any) {
}
@IBAction func openLinkedIn(_ sender: Any) {
UIApplication.tryURL(urls: [self.URLLinkedInApp,
self.URLLinkedInBrowser
])
}
@IBAction func openFacebook(_ sender: Any) {
UIApplication.tryURL(urls: [self.URLFacebookApp,
self.URLFacebookApp2,
self.URLFacebookBrowser
])
}
}
extension UIApplication {
class func tryURL(urls: [String]) {
let application = UIApplication.shared
for url in urls {
if application.canOpenURL(URL(string: url)!) {
application.open(URL(string: url)!, options: [:], completionHandler: nil)
return
}
}
}
}