tezvyn:

UIStackView: Layouts Without Manual Constraints

Source: developer.apple.combeginner

A UIStackView is an invisible container that arranges views in a single column or row, saving you from writing manual layout constraints. It's ideal for toolbars or forms. The main footgun is forgetting it's non-rendering—you can't set its background color.

A UIStackView is an invisible container that automates layout by arranging views in a single column or row. It saves you from writing tedious Auto Layout constraints for common linear patterns like forms or toolbars. The biggest footgun is treating it like a normal UIView; it doesn't render, so you can't set its background color or draw in it directly. It only manages the layout of its child views.

Read the original → developer.apple.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

UIStackView: Layouts Without Manual Constraints · Tezvyn