     @IBOutlet var addCityBtn: UIButton!
     @IBOutlet var cityListTableView: UITableView!
     
-    var cityNames: [String] = [];
     var cities: [City] = [];
     
     let pendingOperations = PendingOperations();

        
        //Create City object
        let addedCity = City(name: cityName);
        cities.append(addedCity);
        switch(addedCity.state)
        {
        case CityWeatherRecordState.New:

        }
        else if(city.state == CityWeatherRecordState.Failed)
        {
            cell.selectionStyle = UITableViewCellSelectionStyle.Default;
            cell.accessoryType = UITableViewCellAccessoryType.None;
            cell.userInteractionEnabled = true;
            cell.cityNameLabel.enabled = false;
            
            cell.progressIconImageView.transform = CGAffineTransformMakeRotation(CGFloat(M_PI*360 / 180.0));
            
            let failureImage = UIImage(named: "SyncFailureIcon");
            cell.progressIconImageView.image = failureImage;
        }
        
        return cell;
    }
    
    
    //UITableView delegate
    func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
        return true
    }
    
    func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
        if (editingStyle == UITableViewCellEditingStyle.Delete)
        {
            // Handle delete (by removing the data from your array and updating the tableview)
            let city = cities[indexPath.row];
            let cityName = city.name;
            println("City to delete: \(cityName)");
            
            cities.removeAtIndex(indexPath.row);
            cityListTableView.deleteRowsAtIndexPaths(
                [indexPath], withRowAnimation: UITableViewRowAnimation.Automatic);
        }
    }
    
    func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath)
    {
        let city = cities[indexPath.row];
        let cityName = city.name;
        if(city.state == CityWeatherRecordState.Downloaded)
        {
            //Show WeatherDayListViewController with list of days
            let selectedCity = cities[indexPath.row];
            let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil);
            let weatherDayListViewController = storyBoard.instantiateViewControllerWithIdentifier("WeatherDayListViewController") as! WeatherDayListViewController;
            weatherDayListViewController.setSelectedCity(selectedCity);
            self.navigationController?.pushViewController(weatherDayListViewController, animated: true);
        }
        else if(city.state == CityWeatherRecordState.Failed)
        {
            //Retry for weather info
            self.startWeatherInfoDownload(city);
        }
        
        tableView.deselectRowAtIndexPath(indexPath, animated: true);
    }
