title: How to align Custom cells to Right Detail and Basic cells?
body: <p>I am using static cells with 4 sections to create a Settings scene:</p>
  
  <p><img src="https://i.stack.imgur.com/hHgnk.png" alt="Xcode screenshot"></p>
  
  <p>For some cells I use the predefined styles: <strong>Right Detail</strong> and <strong>Basic</strong>.</p>
  
  <p>But for the following cells I use <strong>Custom</strong> style with my own constraints:</p>
  
  <ul>
  <li><em>Label</em> on the left and <em>Switch</em> on the right side (like the cell selected in above screenshot)</li>
  <li><em>Slider</em> occupying the whole cell</li>
  </ul>
  
  <p><strong>My problems:</strong> I can not get the leading alignment right and also my 2-lines word-wrapping <em>Label</em> pushes a <em>Switch</em> to the right:</p>
  
  <p><img src="https://i.stack.imgur.com/o5knl.png" alt="screenshot"></p>
  
  <p>As you can see at the top screenshot, my constraints for the problematic <em>Label</em> in <strong>Custom</strong> cell are:</p>
  
  <ul>
  <li>Align Center Y to Superview: 0 pixels</li>
  <li>Leading Space to Superview: 2 pixels (does not match <strong>Right Detail</strong> and <strong>Basic</strong>)</li>
  <li>Trailing Space to <em>Switch</em> equal or greater than: 4 pixels (still pushes the <em>Switch</em> too far to the right)</li>
  </ul>
  
  <p>Please help, I wonder how other apps with Settings screens do it.</p>
  
  <p><strong>SOLUTION:</strong></p>
  
  <ol>
  <li>I have unchecked <strong>Constrain to Margins</strong> and set <strong>Leading Space</strong> to 15 pixels (thanks Andre)</li>
  <li>I have solved my 2nd problem by lowering <strong>Horizontal Content Compression Resistance Priority</strong> of the <em>Label</em> to 250</li>
  </ol>