title: Autolayout not adding gap vertically
body: <p>I am a newbie figuring out autolayout programmatically.</p>
  
  <p>i defined a imageview ,added to superview (UIViewController). added constraints using visual format to set gap . i haven't provided value just dash (-) . As per resource iam referring to learn, without providing value i will get 8pts gap. </p>
  
  <p>I get gap horizontally but not vertically.</p>
  
  <pre><code>- (void)viewDidLoad {
      [super viewDidLoad];
  UIImageView * thumbnailImageView = [[UIImageView alloc] init];
  thumbnailImageView.backgroundColor = [UIColor greenColor];
  thumbnailImageView.image = [UIImage imageNamed:@"thumbnailImage"];
  thumbnailImageView.contentMode = UIViewContentModeScaleAspectFill;
  thumbnailImageView.layer.masksToBounds = true;
  thumbnailImageView.translatesAutoresizingMaskIntoConstraints = false;
  
  [self.view addSubview:thumbnailImageView];
  
  [self.view addConstraints:[NSLayoutConstraint
                        constraintsWithVisualFormat:@"V:|-[thumbnailImageView]-|" options:0
                        metrics:nil
                        views:NSDictionaryOfVariableBindings(thumbnailImageView)]];
  [self.view addConstraints:[NSLayoutConstraint
                             constraintsWithVisualFormat:@"H:|-[thumbnailImageView]-|" options:0
                             metrics:nil
                             views:NSDictionaryOfVariableBindings(thumbnailImageView)]];
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/xOI6R.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xOI6R.jpg" alt="enter image description here"></a></p>