I have the following class written in an earlier version of Swift. The Swift 2 Compiler warns that
\'kABPersonAddressStreetKey\' was d
You need to cast your subtitle as AnyObject as shown below:
let addressDict = [String(kABPersonAddressStreetKey): self.subtitle as! AnyObject]
and your complete code for "func mapItem() -> MKMapItem { }" will be:
func mapItem() -> MKMapItem {
let addressDict = [String(kABPersonAddressStreetKey): self.subtitle as! AnyObject]
let placemark = MKPlacemark(coordinate: self.coordinate, addressDictionary: addressDict)
let mapItem = MKMapItem(placemark: placemark)
mapItem.name = self.title
return mapItem
}