title: iOS app freezes when loading custom info window for marker on Google Maps
body: <p>I am trying to implement a custom info window on my Google Maps Marker on an iOS app. (As is done <a href="http://sweettutos.com/2015/12/14/how-to-make-a-custom-info-window-for-your-marker-with-google-maps-sdk-for-ios/" rel="nofollow noreferrer">here</a> and <a href="https://www.youtube.com/watch?v=ILiBXYscsyYh-google-maps-sdk-for-ios/" rel="nofollow noreferrer">here</a> for example.) </p>
  
  <p>I have created a xib and a <code>UIView</code> class for it. It is called <code>CustomInfoWindow.xib</code> and the class is <code>CustomInfoWindow.swift</code>.</p>
  
  <p>My Custom Info Window is currently blank, i.e. I have not yet added any <code>UIControl</code>s to my xib. I have also not yet added any code to my class file. </p>
  
  <p>The <code>CustomInfoWindow.swift</code> file basically looks like:</p>
  
  <pre><code>import UIKit
  class CustomInfoWindow: UIView {}
  </code></pre>
  
  <p>In my ViewController for my maps my <code>markerInfoWindow</code> method is as follows:</p>
  
  <pre><code>func mapView(mapView: GMSMapView!, markerInfoWindow marker: GMSMarker!) -&gt; UIView! {
      let customInfoWindow = NSBundle.mainBundle().loadNibNamed("CustomInfoWindow", owner: self, options: nil)[0] as! CustomInfoWindow
  
      return customInfoWindow
  }
  </code></pre>
  
  <p>When I run the code and I click on one of my markers, the blank <code>CustomInfoWindow</code> displays fine.</p>
  
  <p>The strange thing is that the moment I add any UI Element to the <code>CustomInfoWindow.xib</code> in the Interface Builder and run my app again then suddenly when I click on a marker the app freezes. (For example when I add a <code>UILabel</code> or a <code>UIImage</code> to the <code>CustomInfoWindow.xib</code>.) If I remove the UI Element then the blank nib displays fine over the marker.</p>
  
  <p>If I test my nib by adding it as a subview on some View Controller then it loads fine with my <code>UILabel</code> and <code>UIImage</code>. However, when I use that same nib in the <code>markerInfoWindow</code> the app freezes.</p>
  
  <p>What can the problem be?</p>
  
  <p>UPDATE:
  This issue occurred on version 1.13 of the Google Maps SDK for iOS and it turned out to be a <a href="https://code.google.com/p/gmaps-api-issues/issues/detail?id=9525" rel="nofollow noreferrer">bug on that version</a>.</p>