How to set View height as percentage of the screen height in Storyboards with XCode 7

Viewed 5619

I need to design the view like below image and I have tried with fixed heights and also tried compact width and regular height and regular width and compact height but those scenarios did not worked for me.

How can i set View height as percentage of the screen height in Storyboards?

I'm using Xcode 7

enter image description here

3 Answers

You can simply set the height of each one as a ratio of the UI height, 15% height would be;

.frame(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height * 0.15)
Related