In MapBox, I want when the user touches an annotation pin, that a tableview within a callout will appear. I tried using, but it just ends up covering the entire screen. Is there a better way to achieve this?
func mapView(_ mapView: MGLMapView, leftCalloutAccessoryViewFor annotation: MGLAnnotation) -> UIView? {
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let vc: UITableViewController = storyboard.instantiateViewController(withIdentifier: "newtableview") as! UITableViewController
self.present(vc, animated: true, completion: nil)
return nil
}
For better clarification, this is similar to what I am trying to achieve