How can I put an optional value in this condition?
func mapView(mapView: MKMapView, regionDidChangeAnimated animated: Bool) {
if var annotations = mapView.annotations {
for annotation in annotations {
if let a = annotation as? MKPointAnnotation {
encontrarEnderecoPara(a)
}
}
}
}