Using a MKMapView I have a pile of annoatations loaded onto it and I want to be able to filter the annotations displayed with a segmented control.
I’m using custom annotations with a type variable so I can tell them apart from one another but I haven’t been able to find a way to hide and display a subset of annotation views at will.
Sure, try this:
Objective-C solution:
Swift 4 solution:
This will return you the view associated with the specified annotation object, then you can set the view to hidden. Here is the documentation.