title: How to make a UIImageView, center vertically in container with constraints programmatically
body: <p>I want to center UIImageView (<code>self.showImageView</code>) in container view (<code>self.view</code>)</p>
  
  <p>I tried below code it did't work:</p>
  
  <pre><code>NSLayoutConstraint *xCenterConstraint = [NSLayoutConstraint constraintWithItem:self.showImageView attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0];
  [self.view addConstraint:xCenterConstraint];
  
  NSLayoutConstraint *yCenterConstraint = [NSLayoutConstraint constraintWithItem:self.showImageView attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0];
  [self.view addConstraint:yCenterConstraint];
  </code></pre>