Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- specimens = try! Realm().objects(Specimen) // 2
- // Create annotations for each one
- for specimen in specimens { // 3
- let coord = CLLocationCoordinate2D(latitude: specimen.latitude, longitude: specimen.longitude);
- let specimenAnnotation = SpecimenAnnotation(coordinate: coord,
- title: specimen.name,
- subtitle: specimen.category.name,
- specimen: specimen)
- mapView.addAnnotation(specimenAnnotation) // 4
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement