title: How do I position a label and a button on an image so that even if the image is scaled they are at the same place on the image?
body: <p>I have an almost complete app. I want to use auto layout but even though I have searched a lot about this subject I could not find an answer that I could use. I can get it to show correctly on one screen size but not on another... Here is my question </p>
  
  <p>How do I put the necessary constraints so that even if the counter is scaled for the different sized devices,the label and the button are at the same place on the image? (the image is a png image)</p>
  
  <p>I would really be glad if you can answer or direct me to an answer that shows how to do a similar thing.</p>
  
  <p>This is what I want
  <a href="https://i.stack.imgur.com/0eX3c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0eX3c.png" alt="Demo Image"></a></p>
  
  <p>And this is what happens if I try doing it with auto layout and on a different screen size.</p>
  
  <p><a href="https://i.stack.imgur.com/XDV3b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XDV3b.png" alt="Demo Image 2"></a></p>
  
  <ul>
  <li>This is not the same image that I am using in my app but it will give you an idea.)</li>
  </ul>
  
  <p>Thanks again</p>
  
  <p>Edit: </p>
  
  <p>Thanks for the answers but as pointed out in the comments, 1st answer does not provide a way to scale the image for different screen sizes.</p>
  
  <p>Second answer provides a way but I could not understand the 2nd part of the answer.I need a little bit more detail. I would be glad if there is anyone out there who can help me on this issue. </p>
  
  <p>I am still struggling with this issue. If I follow the 2nd answer Xcode says I need X position,width for the first filler view and Y position,height for the 2nd filler view.I am stuck at this point. I am not sure what value to give to these views.</p>