I just upgraded ray wenderlich mapkit tutorial to xcode 7 error for MKPlacemark. I'm still only new with coding and I'm not 100% sure where to start on how to fix this error. I searched but to know avail.
Thanks for any help. It's much appreciated.
http://www.raywenderlich.com/90971/introduction-mapkit-swift-tutorial
This is the code I'm getting an error with:
// annotation callout opens this mapItem in Maps app
func mapItem() -> MKMapItem {
let addressDict = [String(kABPersonAddressStreetKey): self.subtitle]
let placemark = MKPlacemark(coordinate: self.coordinate, addressDictionary: addressDict)
let mapItem = MKMapItem(placemark: placemark)
mapItem.name = self.title
return mapItem
The error is:
Cannot invoke initializer for type 'mkplacemark' with an argument of list type 'coordinate:CLLocationCoordinate2D, addressDictionary:[String : String?])'
Thanks again,
Travis.