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.

68 lines
1.7 KiB

6 years ago
  1. //
  2. // SupportViewController.swift
  3. // GMERemittance
  4. //
  5. // Created by Sujal on 2/10/18.
  6. // Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import UIKit
  9. class SupportViewController: UIViewController {
  10. var supportIndex: Int!
  11. @IBOutlet weak var buttonPhone: UIButton!
  12. override func viewDidLoad() {
  13. super.viewDidLoad()
  14. setUpNavBar(id: 202, title: "")
  15. }
  16. override func didReceiveMemoryWarning() {
  17. super.didReceiveMemoryWarning()
  18. }
  19. override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  20. let messageComposeViewController = segue.destination as! MessageComposeViewController
  21. messageComposeViewController.supportIndex = supportIndex
  22. }
  23. /**
  24. Call to the number
  25. */
  26. @IBAction func callSupportCenter(_ sender: Any) {
  27. let phoneNumber = buttonPhone.title(for: .normal)!
  28. guard let number = URL(string: "tel://" + phoneNumber.removeWhitespacesInBetween()) else {
  29. return
  30. }
  31. UIApplication.shared.openURL(number)
  32. }
  33. /**
  34. Push view to suggestion request
  35. */
  36. @IBAction func sendSuggestion(_ sender: Any) {
  37. supportIndex = 2
  38. performSegue(withIdentifier: "sendMessage", sender: nil)
  39. }
  40. /**
  41. Push view to amendment request
  42. */
  43. @IBAction func sendAmendmentRequest(_ sender: Any) {
  44. supportIndex = 1
  45. performSegue(withIdentifier: "sendMessage", sender: nil)
  46. }
  47. /**
  48. Push view to Enquiry request
  49. */
  50. @IBAction func sendGeneralEnquiry(_ sender: Any) {
  51. supportIndex = 0
  52. performSegue(withIdentifier: "sendMessage", sender: nil)
  53. }
  54. }