title: How to load an image in prepareForInterfaceBuilder with a IBDesignable UIImageView
body: <p>I would like to load a sample image in an IB designable <code>UIImageView</code>, to be shown in Interface Builder while editing the interface. The following code does not work, as the view placeholder in IB remains empty (the view area contains only the UIImageView text):</p>
  
  <pre><code>@IBDesignable
  class TestImageView : UIImageView
  {
      override func prepareForInterfaceBuilder() {
          //let bundle = NSBundle.mainBundle()
          let bundle = NSBundle(forClass: nil)
          let imagePath = bundle.pathForResource("Test", ofType: "jpg")
          self.image = UIImage(contentsOfFile: imagePath)
      }
  }
  </code></pre>
  
  <p>Note that:</p>
  
  <ul>
  <li>in IB the Custom Class class for the view is correct (TestImageView)</li>
  <li>Test.jpg is present in the project (if I manually set the image property of the <code>UIImageView</code> in IB the image shows up).</li>
  <li>I tried the two different methods of getting the bundle present in the code</li>
  </ul>
  
  <p>This was tested with Xcode 6 beta 3.</p>
  
  <p><strong>Update</strong>: in both cases the bundle path I get is <code>"/Applications/Temporary/Xcode6-Beta3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays"</code>. In that path the image is obviously not present.</p>