title: Can't center image in UIImageView programatically
body: <p>In UIView subclass init method I have this piece:</p>
  
  <pre><code>      imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 44, 320, 436)]; 
        imageView.contentMode = UIViewContentModeCenter;
        [self addSubview:imageView];
        UIImage* myImage = [UIImage imageWithData: 
                          [NSData dataWithContentsOfURL: 
                           [NSURL URLWithString: imageSource]]];
        myImage = [[MyMath sharedMySingleton] imageWithImage:myImage convertToSize:CGSizeMake(320, 436)]; // resizes image to set bounds
        imageView.contentMode = UIViewContentModeCenter;
        [imageView setImage:myImage];
  </code></pre>
  
  <p><code>imageView.contentMode = UIViewContentModeCenter;</code> should center image, but still it shows up in top left corner. What am I doing wrong?</p>
  
  <p>EDIT: Sorry, i found answer myself. thanks to everyone</p>