Having trouble converting this line of Objective C code to Swift
for (id <MKAnnotation> annotation in mapView.annotations) {
// Do Something
}
When I try:
for (annotation:MKannotation in mapView.annotations)
OR
for (annotation in mapView.annotations)
I get: Expected ';' in 'for' statement
Thanks!!
Here is the answer:
for annotation in mapView.annotations as [MKAnnotation] {...}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With