I donโt know how to change the code for the color of the buffer in iOS 9 (because Apple has recently changed the code for it), and I'm still new to Swift. So, I do not know how to integrate pinTintColor into my code now.
Below is the code:
import UIKit import MapKit class ViewController: UIViewController, MKMapViewDelegate { @IBOutlet var map: MKMapView! override func viewDidLoad() { super.viewDidLoad() let annotation = MKPointAnnotation() let latitude:CLLocationDegrees = 40.5 let longitude:CLLocationDegrees = -74.6 let latDelta:CLLocationDegrees = 150 let lonDelta:CLLocationDegrees = 150 let span:MKCoordinateSpan = MKCoordinateSpanMake(latDelta, lonDelta) let location:CLLocationCoordinate2D = CLLocationCoordinate2DMake(latitude, longitude) let region:MKCoordinateRegion = MKCoordinateRegionMake(location, span) map.setRegion(region, animated: false) annotation.coordinate = location annotation.title = "Niagara Falls" annotation.subtitle = "One day bla bla" map.addAnnotation(annotation) } func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? {
user5370095
source share