I have created a xib and a view controller, and want to display it a customised info window for a marker in swift. After searching on the Internet I have found an old tutorial in OBJ-C however this will not help me.
Thank you.
I have created a xib and a view controller, and want to display it a customised info window for a marker in swift. After searching on the Internet I have found an old tutorial in OBJ-C however this will not help me.
Thank you.
You can implement the markerInfoWindow method from GMSMapViewDelegate
Sample implementation to show an custom info window in Swift:
You can visit this GitHub page for detail implementation.
Depends on how you want your info window looks like, you can change the background color by doing
infoWindow.backgroundColor = UIColor.redColor()
, or change the shape of your info window by doinginfoWindow.layer.cornerRadius = 10.0f
, or even add an image by doinginfoWindow.imageView.image = UIImage(named: "image.jpg")
.