init(item:)
Creates a place descriptor from a map item.
Declaration
init?(item: MKMapItem)Parameters
- item:
An
MKMapItem.
Discussion
Use this method to create a PlaceDescriptor from an existing MKMapItem as shown here.
guard let descriptor = PlaceDescriptor(item: selectedSearchResult) else {
return
}Note that it’s possible for this initialization to fail if the system can’t resolve the provided map item.