 		super.viewDidLoad()
 		
 		mapView.delegate = self
+		
+		//add long press gesture for pins
+		let longPressGesture = UILongPressGestureRecognizer(target: self, action: "addPinToMap:")
+		longPressGesture.minimumPressDuration = 2
+		mapView.addGestureRecognizer(longPressGesture)
 	}
 	
 	override func viewWillAppear(animated: Bool) {

		super.didReceiveMemoryWarning()
		// Dispose of any resources that can be recreated.
	}
}

extension MapViewController : MKMapViewDelegate {

		
		NSKeyedArchiver.archiveRootObject(mapSettings, toFile: mapSettingsPath)
	}
	
	func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? {
		let pinView = MKPinAnnotationView(annotation: annotation, reuseIdentifier: nil)
		pinView.animatesDrop = true
		
		return pinView
	}
}

