//
//  FeedBackViewController.swift
//  kt
//
//  Created by neox on 27.09.17.
//  Copyright © 2017 SimpleCode. All rights reserved.
//

import UIKit

class FeedBackViewController: UIViewController {

    @IBOutlet weak var b160: CircleButton!
    @IBOutlet weak var b165: CircleButton!
    
    override func viewDidLoad() {
        
        super.viewDidLoad()
        
        let b160Gesture = UITapGestureRecognizer(target: self, action:  #selector (self.b160Event (_:)))
        b160.addGestureRecognizer(b160Gesture)
        
        let b165Gesture = UITapGestureRecognizer(target: self, action:  #selector (self.b165Event (_:)))
        b165.addGestureRecognizer(b165Gesture)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
    
    func b160Event(sender:UITapGestureRecognizer) {
        if let url = NSURL(string: "tel://160") where UIApplication.sharedApplication().canOpenURL(url) {
            UIApplication.sharedApplication().openURL(url)
        }
    }

    func b165Event(sender:UITapGestureRecognizer) {
        if let url = NSURL(string: "tel://165") where UIApplication.sharedApplication().canOpenURL(url) {
            UIApplication.sharedApplication().openURL(url)
        }
    }

}
