1

I have created header UIView on storyboard view controller, now I need to create 4 views like below colored image Into that UIview base view. It should show for all devices. Need to adjust auto layout using iOS.

enter image description here

Bhavin Bhadani
  • 22,224
  • 10
  • 78
  • 108
Anushka
  • 53
  • 1
  • 7
  • YES! Exactly but Its should show for all devices@EI Captain – Anushka Dec 19 '15 at 06:31
  • ok...you can check this and try using this links...http://stackoverflow.com/questions/29620409/need-assistance-setting-two-buttons-of-equal-width-side-by-side-autolayout/29620794#29620794 or check this..http://stackoverflow.com/questions/32862142/how-to-add-equal-spacing-and-equal-widht-for-button-in-ios-auto-layout/32862693#32862693 ...tell me if you want more help – Bhavin Bhadani Dec 19 '15 at 06:32
  • Awesome help. Mr.EI Captain. Thank you so much! Btw when U l update?:) – Anushka Dec 19 '15 at 06:34
  • i think you need to set proportional width of all four views to 0.25 related to HeaderView. – Will Smith Dec 19 '15 at 06:52
  • Sorry I cant get you!@MaheshDhapa – Anushka Dec 19 '15 at 06:59

2 Answers2

9

First set constraints to header view. Select header view and apply following constraints:

  • Leading, top, trailing space and Height = 80 (for example)

Once you apply constraints to header view then select all buttons at once :

enter image description here

Hope this can help

Irfan
  • 5,070
  • 1
  • 28
  • 32
4

Try this..

Now IOS 9 realse new feature stackview .

U can drag the stackview into your header view and add uiviews into it.

You can also change stackview's properties based on your project..

Sreekanth
  • 549
  • 5
  • 13