0

I have two UIButton having constraints from left and top at 22 point. The second one is below the first UIButton and has a constraint of 22 point from left and 22 point from the first UIButton.

My concern is I want the gap between the two UIButton should increase with different size of iPhones as per the aspect ratio. I have a constraint of Equal width & Equal height tuned up with the multiplier on UIButton which makes the size of the UIButton grow with different sizes of iPhone but I want the gap between two UIButton to grow as well.

Ankit Khanna
  • 1,019
  • 2
  • 12
  • 22
  • use spacerview between 2 buttons...check this...https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/AutoLayoutbyExample/AutoLayoutbyExample.html – Bhavin Bhadani Aug 06 '15 at 16:15
  • see my answer here...i think this will help ....http://stackoverflow.com/a/31336272/4030971 – Mahesh Agrawal Aug 07 '15 at 05:55
  • @Bhavin You mean to say there is no way by which we can resize the distance between two UIButton or UIViews using a multiplier or something. You have to indeed use another spacer View and apply the aspect ratio on that view so when that view resizes with different iPhone screen size it will eventually resize the gap between the UIButton. Am i correct ? Thanks for confirming the same. But I guess it is a lot more straight forward with Springs and struts method which was used earlier. – Ankit Khanna Aug 07 '15 at 08:12
  • I have another similar problem now with the auto layout. I want to resize the image view with respect to the superview. I was doing it using multiplier and Equal Width / Height but when I am trying to do the same on the Table View Controller I can't see the Equal Width / Height option. It is a static cell with fixed table height at 75 point. image view is 30 x 30 points and i want it to resize with different iPhone screen size. ImageView -> Container View Equal Width constraint not showing. – Ankit Khanna Aug 07 '15 at 08:19

0 Answers0