title: Snapkit: Constrain multiple to margins
body: <p>I'm using Snapkit to simplify my autolayout code, however one scenario seems to popup very regularly, which i'm wondering if there's a way which involves less code.</p>
  
  <p>So let's say that I need to pin the edges of a <code>UIView</code> to it's superview margins, we might do something like this:</p>
  
  <pre><code>subView.snp.makeConstraints { make in
      make.top.equalTo(parentView.snp.topMargin)
      make.bottom.equalTo(parentView.snp.bottomMargin)
      make.left.equalTo(parentView.snp.leftMargin)
      make.right.equalTo(parentView.snp.rightMargin)
  }
  </code></pre>
  
  <p>This essentially results in the subview filling the parent view, except for a small amount of padding as defined by the parent views layout margins.I'm sure some variation of this is pretty common.</p>
  
  <p>This seems overly verbose for this library. It has some really nice helper methods such as these</p>
  
  <pre><code>make.edges.equalToSuperview()
  make.top.left.right.equalToSuperview()
  </code></pre>
  
  <p>What I haven't managed to find in their documentation however is how to do the two above helper methods, in relation to the margins.</p>
  
  <p>What i'm looking for (if it exists) is something akin to:</p>
  
  <pre><code>make.edges.equalToSuperview().withMargins()
  make.top.left.right.equalToSuperview().withMargins()
  make.top.left.right.equalTo(someview).withMargins()
  </code></pre>
  
  <p>So, is there a way of doing this other than the very verbose way? Am I missing something in the documentation or maybe this could be added by extension?</p>