title: iOS Autolayout with UIScrollview: Why does content view of scroll view not fill the scroll view?
body: <p>The following code (called in viewDidLoad) results in a fully red screen.  I would expect it to be a fully green screen.  Why is it red?  And how can I make it all green?</p>
  
  <pre><code>UIScrollView* scrollView = [UIScrollView new];
  scrollView.translatesAutoresizingMaskIntoConstraints = NO;
  scrollView.backgroundColor = [UIColor redColor];
  [self.view addSubview:scrollView];
  
  UIView* contentView = [UIView new];
  contentView.translatesAutoresizingMaskIntoConstraints = NO;
  contentView.backgroundColor = [UIColor greenColor];
  [scrollView addSubview:contentView];
  
  NSDictionary* viewDict = NSDictionaryOfVariableBindings(scrollView,contentView);
  
  [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[scrollView]|" options:0 metrics:0 views:viewDict]];
  [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[scrollView]|" options:0 metrics:0 views:viewDict]];
  
  [scrollView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[contentView]|" options:0 metrics:0 views:viewDict]];
  [scrollView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[contentView]|" options:0 metrics:0 views:viewDict]];
  </code></pre>