Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. specimens = try! Realm().objects(Specimen) // 2
  2.  
  3. // Create annotations for each one
  4. for specimen in specimens { // 3
  5. let coord = CLLocationCoordinate2D(latitude: specimen.latitude, longitude: specimen.longitude);
  6. let specimenAnnotation = SpecimenAnnotation(coordinate: coord,
  7. title: specimen.name,
  8. subtitle: specimen.category.name,
  9. specimen: specimen)
  10. mapView.addAnnotation(specimenAnnotation) // 4
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement