//
//  BlueButton.swift
//  kt
//
//  Created by Assylkhan Rakhatov on 31.01.16.
//  Copyright © 2016 Alexandr Zalutskiy. All rights reserved.
//

import Foundation
import UIKit

class BlueButton: UIButton {
  
  override func awakeFromNib() {
    super.awakeFromNib()
    setTitleColor(.whiteColor(), forState: .Selected)
  }
  
//  override var selected: Bool {
//    didSet {
//      if selected {
//        backgroundColor = BlueButtonHightlightedColor
//        self.titleLabel?.alpha = 1
//      } else {
//        backgroundColor = BlueButtonColor
//      }
//    }
//  }
  
  override var highlighted: Bool {
    didSet {
      if highlighted {
        self.titleLabel?.alpha = 1
        backgroundColor = Color.BlueButtonHightlightedColor
      } else {
        backgroundColor = Color.DashboardBlueColor
      }
    }
  }
}
