ios - Specify Constraints for two UIViews in percentage -


following image shows design 2 uiview. 1 in green should 20% , yellow should 80%, in land scape or portrait.

i missing on constraint or content hugging change, trying fix.

note: content hugging , compression priority has default values.

enter image description here

enter image description here

you don't want have fixed height of 212 top view. want 20% of it's super view.

  1. you should delete top view's height constraint of 212.
  2. select both top view , super view.
  3. add equal height constraint.
  4. double click on constraint , open it's size inspector.
  5. change multiplier 0.2

example. first item "view" you.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -