Upload
nscoder-mexico
View
64
Download
0
Tags:
Embed Size (px)
Citation preview
Código para UIif (IPHONE4) { … } else if (IPHONE 5){ … } else if (IPHONE6) { … } else if (IPHONE6PLUS) { … } else if (IPAD) { … }
Otros conceptos• Constraint Priority: prioridad, si dos constraints están en
conflictos el que tiene mayor prioridad gana
• Intrinsic Size: tamaño mínimo de un elemento (view) para que se vea completamente
• Hugging Priority: cuanto los constraint van a reducir el taño del elemento hasta tocar su Intrinsic Size
• Compression Resistance Priority: cuando varios elementos compiten por el espacio y alguno tiene que ser reducido mas allá de su Intrinsic Size, el que tenga menor prioridad sera reducido y el de mayor prioridad no lo hará
Código para UI (antes)if (IPHONE4) { … } else if (IPHONE 5){ … } else if (IPHONE6) { … } else if (IPHONE6PLUS) { … } else if (IPAD) { … }
Código para UI usando Size Classes
if (Any) { … } else if (Regular) { … } else if (Compact) { … }
Podemos especificar diferentes orientaciones usando Horizontal Size Class y Vertical Size Class