title: iOS 6/7 deltas make background container disappear
body: <p>I'm currently working on a legacy application that was initially developed before iOS 6 was out, let alone iOS 7. Part of my job is making it look acceptable on both iOS 7 and older versions. This is how my app looks in iOS 7, which is pretty much how it's supposed to look:</p>
  
  <p><img src="https://i.stack.imgur.com/K4gBn.png" alt="iOS 7 screenshot"></p>
  
  <p>First off: my root element is a normal view which just fills the screen, as normal. Inside it are, in order, the ScrollView containing the image and both purple bars which are Views with Labels in them.</p>
  
  <p>What I did to make it work on iOS 6 and below is this:</p>
  
  <ul>
  <li>I added a -20 height delta to the topmost purple bar.</li>
  <li>I added -20 Y deltas to the ScrollView and the bottom purple bar, and of course to the labels in the top bar.</li>
  </ul>
  
  <p>However, this is what happens:</p>
  
  <p><img src="https://i.stack.imgur.com/xibeM.png" alt="iOS 6 screenshot"></p>
  
  <p>Now, first of all, the different languages have no bearing on the problem, it's just how my physical testing device is set up. The storyboards are set up the same.</p>
  
  <p>What I derive from this is that the elements are positioned where they need to be as their children are all showing up in the correct spots, but the background color for the Views seems to turn transparent.</p>
  
  <p>Some useful things to know:</p>
  
  <ul>
  <li>If I didn't mention above that I set a height, width, X or Y delta, then it is set to 0.</li>
  <li>All positioning is stored into the storyboard. The ScrollView has an X, Y, width and height of 0, 40, 320, 420 respectively. The top bar is at 0, 0, 320, 40 and the bottom view at 0, 460, 320, 20.</li>
  <li>The buttons you see to the sides and the logo at the bottom are put in programmatically. Their parent is the main view, so they're on the same level of hierarchy as the ScrollView and the two bars.</li>
  <li>Even if I programmatically set the background color to red (for instance) it stays invisible in iOS 6. It turns red just fine in iOS 7, so the code I use for that is fine.</li>
  </ul>
  
  <p>Does anyone know what may be causing my backgrounds to disappear?</p>