SCustomerServiceViewController.swift 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // SCustomerServiceViewController.swift
  3. // O2Platform
  4. //
  5. // Created by 刘振兴 on 2016/10/13.
  6. // Copyright © 2016年 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. class SCustomerServiceViewController: UIViewController {
  10. @IBOutlet weak var sButton1: UIButton!
  11. @IBOutlet weak var sButton2: UIButton!
  12. @IBOutlet weak var sButton3: UIButton!
  13. override func viewDidLoad() {
  14. super.viewDidLoad()
  15. sButton1.layer.cornerRadius = 8
  16. sButton1.layer.masksToBounds = true
  17. sButton1.addTarget(self, action: #selector(self.btnAction(sender:)), for: .touchUpInside)
  18. sButton2.layer.cornerRadius = 8
  19. sButton2.layer.masksToBounds = true
  20. sButton2.addTarget(self, action: #selector(self.btnAction(sender:)), for: .touchUpInside)
  21. sButton3.layer.cornerRadius = 8
  22. sButton3.layer.masksToBounds = true
  23. sButton3.addTarget(self, action: #selector(self.btnAction(sender:)), for: .touchUpInside)
  24. }
  25. override func didReceiveMemoryWarning() {
  26. super.didReceiveMemoryWarning()
  27. // Dispose of any resources that can be recreated.
  28. }
  29. @objc func btnAction(sender:UIButton){
  30. let alertController = UIAlertController(title: "", message: "客服电话:0571-88480860", preferredStyle: .actionSheet)
  31. let telAction = UIAlertAction(title: "呼叫", style: .destructive) { (action) in
  32. }
  33. let cancelAction = UIAlertAction(title: "取消", style: .cancel) { (action) in
  34. }
  35. alertController.addAction(telAction)
  36. alertController.addAction(cancelAction)
  37. self.present(alertController, animated: true, completion: nil)
  38. }
  39. }