title: Xcode - TagTextField Component: Dynamically resize superview to fit subviews
body: <p>I have created a UIView with two subviews; a uibutton and uitextfield. The button is on the left of the text field and constraints determine the horizontal position for the text field automatically. Similarly the UITextfield expands to fit it's text content dynamically using constraints too.</p>
  
  <p>I want the superview (UIView) to expand to the width of the both controls automatically but can't find a way to do so. Could someone suggest a way to create constraints for a superview so it adjusts when it's subviews change size?</p>
  
  <p>Thanks
  D</p>
  
  <p><strong>Update</strong>
  Heya, So I am trying to create a Tag-Textfield like the following, where the user can enter text on the right or press a button on the left to prompt a modal popover list:
  <img src="https://i.stack.imgur.com/ApSFs.png" alt="Search filter type - In Mail on OSX"></p>