Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning iOS UI Development

You're reading from  Learning iOS UI Development

Product type Book
Published in Dec 2015
Publisher
ISBN-13 9781785288197
Pages 196 pages
Edition 1st Edition
Languages

User interface's traits


A trait consists of a set of properties that determines how the user interface or a portion of it should change as its environment or, more broadly, the available space for its contents and changes.

These properties include size classes for both horizontal and vertical dimensions as well as display scale, user interface idiom, and forceTouchCapability, and they define a trait collection.

Trait collection and trait environment

Designing adaptive user interfaces essentially means writing layouts that adapt according to changes in trait collections.

The UITraitCollection class is the data type that defines a trait collection and it is the entry point for the traits we described earlier. The following table illustrates the properties that are part of a trait collection:

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}

Trait

Description

  • verticalSizeClass

  • (UIUserInterfaceSizeClass)

This is the vertical size class for the trait collection; the possible values for this property are .Regular, .Compact, or .Unspecified...