 <p>Here is the code for Swift3:</p> <pre><code>func mapView(_ mapView: GMSMapView, markerInfoWindow marker: GMSMarker) -&gt; UIView? { let infoWindow = Bundle.main.loadNibNamed("InfoWindow", owner: self, options: nil)?.first as! CustomInfoWindow infoWindow.name.text = ""Sydney Opera House" infoWindow.address.text = "Bennelong Point Sydney" infoWindow.photo.image = UIImage(named: "SydneyOperaHouseAtNight") return infoWindow } </code></pre>