title: UIImageView is not always shown
body: <p>I'm debugging a problem with an imageView not being shown.</p>
  
  <pre><code>imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imageName]];
  NSLog(@"imageView right after initialization is: %@", imageView);
  
  imageView.frame = CGRectMake(2, 0, 316, 45);
  imageView.layer.zPosition = zPos;
  NSLog(@"imageView after running the setters: %@", imageView);
  
  [self.view addSubview:imageView];
  </code></pre>
  
  <p>The weird part is that sometimes the <code>imageView</code> gets displayed, sometimes it's not (about 75% of the time it's displayed).</p>
  
  <p><code>imageView</code> is not accessed anywhere except the code above.</p>
  
  <p>What I noticed is that when the <code>imageView</code> <strong>is not displayed</strong>, the first log statement shows that:</p>
  
  <blockquote>
    <p>imageView right after initialization is: &lt;UIImageView: 0x9eaa760;
    frame = (0 0; 0 0); userInteractionEnabled = NO; layer = &lt;CALayer:
    0x9ec04a0&gt;&gt;</p>
  </blockquote>
  
  <p>When the image view <strong>is displayed</strong>:</p>
  
  <blockquote>
    <p>imageView right after initialization is: &lt;UIImageView: 0xaa61ad0;
    frame = (0 0; 644 88); opaque = NO; userInteractionEnabled = NO; layer
    = &lt;CALayer: 0xaa61330&rt;&rt;</p>
  </blockquote>
  
  <p>EDITED:
  I ran tens of tests, the imageView always behaves the same: when it is not shown, the initial frame is (0 0; 0 0). When it's not, it's always some other value.</p>
  
  <p>P.S. I'm not using ARC.</p>