Join Scott Gardner for an in-depth discussion in this video Intrinsic content sizes, part of iOS UI Development with Visual Tools.
- View Offline
- Many views, and controls, which are UI view sub-classes,…have what's called intrinsic width and/or height.…What this means is, those views know what their width…and/or height should be based on the content they hold…or the size of their controls.…Such as, the thumbnail of a slider.…So, instead of having to explicitly define a width…or height for a view that knows it's intrinsic width…or height value, you can optionally let those intrinsic…sizes define how they should be laid out.…For example, labels, image views, and buttons all have…intrinsic widths and heights.…
Their intrinsic size is determined by their contents.…For example, a label's intrinsic size is based on the…font size and it's text.…And an image views intrinsic content size is based on…it's image's size.…Pickers, which can be used with a wide variety of…content types, such as dates and times,…or custom values, all have the default intrinsic size.…Switches and steppers do not have any content and instead…have a default intrinsic size based on their controls.…
Here iOS app architect Scott Gardner explains how to create designable views and dynamic and adaptive user interfaces for any screen size or orientation. He shows how to work with stack views, images, custom fonts, and Interface Builder's Auto Layout tools, which speed up your design process and help adhere to Apple's interface guidelines. Along the way, he provides best practices for designing interfaces that are clean, efficient, and enjoyable for users.
- Creating and customizing views
- Laying out a user interface
- Working with dynamic Auto Layout designs
- Stacking views
- Creating an adaptive layout
- Handling orientation changes
- Working with images
- Customizing fonts