 import UIKit
 import SwiftOverlays
 
-class WeatherViewController: UIViewController {
-
+class WeatherViewController: UIViewController, UIGestureRecognizerDelegate {
+    
     let apiManager = APIManager()
     
     @IBOutlet weak var day0: WeatherConditionView!

    @IBOutlet weak var day4: WeatherConditionView!
    @IBOutlet weak var day5: WeatherConditionView!
    
    @IBAction func refreshPressed(sender: UIBarButtonItem) {
        refresh()
    }
    
    override func viewDidLoad() {
        
        refresh()
        

                return
            }
            
            //Fills the [WeatherCondition] in the UI
            for i in 0...5 { self.days[i].weatherCondition = weatherConditions[i] }
            
            self.view.backgroundColor = weatherConditions[0].color
            print("Successfully filled UI with refreshed Data!")
            
        }
        
        //Calling the API-Manager for fresh Data
        SwiftOverlays.showBlockingWaitOverlayWithText("Refreshing...")
        apiManager.fetchForecast({ weatherConditions in refreshCallback(weatherConditions)})
    }
    
}
