                 
                 }, completion: {[unowned self](finished) in
                     self.searchController.citySearchBar.resignFirstResponder()
-
             })
             UIView.animateWithDuration(0.5, delay: 0, options: [UIViewAnimationOptions.BeginFromCurrentState, UIViewAnimationOptions.CurveEaseInOut], animations: {[unowned self]() in
                 self.maskView.alpha = 0.0

class AddCityPageVC: UIViewController {

    //MARK: Property
    var cities = [String]()
    var filteredCities = [String]()
    
    var senderView : UITableViewCell
    let maskView = UIView()
    
    let searchTableView = UITableView()
    var searchController : CitySearchController!
    
    var rootViewController : UIViewController!

    var delegate : SelectCityForAddingDelegate?

    //MARK: Life cycle
    init(senderView : UITableViewCell,backgroundColor:UIColor){
        self.senderView = senderView
        self.maskView.backgroundColor = backgroundColor
        
        rootViewController = UIApplication.sharedApplication().keyWindow!.rootViewController!
        
        if let controller = rootViewController as? MainViewController{
            delegate = controller

    
    override func viewDidLoad() {
        super.viewDidLoad()
        initCities()
    }
    
