when i am using googlemaps all I have to do is
let marker = GMSMarker()
marker.position = postions.target
marker.title = "TEST"
marker.map = self.mapView
let myCustomView:CustomView = UINib(nibName: "CustomView", bundle: nil).instantiate(withOwner: nil, options: nil)[0] as! CustomView
marker.iconView = myCustomView
but if i am using MAPKIT, how will I achieve this.? Mycustomview is a xib view file i created.
ok i found the solution
Try to add the object of the nib view to the annotation view like this