Type Method

traitCollectionWithForceTouchCapability:

Creates a trait collection containing only a specified force touch capability trait.

Declaration

+ (UITraitCollection *)traitCollectionWithForceTouchCapability:(UIForceTouchCapability)capability;

Parameters

capability

The force touch capability for the new trait collection. Use one of the constants from the UIForceTouchCapability enumeration.

Return Value

A new trait collection containing only a specified force touch capability trait.

See Also

Creating a Trait Collection

- init

Returns a new trait collection whose traits are set to their default (unspecified) values.

+ traitCollectionWithTraitsFromCollections:

Returns a new trait collection consisting of traits merged from a specified array of trait collections.

+ traitCollectionWithUserInterfaceIdiom:

Returns a new trait collection containing only a specified interface idiom.

+ traitCollectionWithHorizontalSizeClass:

Returns a new trait collection containing only a specified horizontal size class.

+ traitCollectionWithVerticalSizeClass:

Returns a new trait collection containing only a specified vertical size class.

+ traitCollectionWithUserInterfaceStyle:

Returns a new trait collection containing only the specified user interface style trait.

+ traitCollectionWithAccessibilityContrast:

Returns a new trait collection containing only the specified accessibility contrast trait.

Beta
+ traitCollectionWithUserInterfaceLevel:

Returns a new trait collection containing only the specified user interface level trait.

Beta
+ traitCollectionWithLegibilityWeight:

Returns a new trait collection containing only the specified legibility weight trait.

Beta
+ traitCollectionWithDisplayScale:

Returns a new trait collection containing only a specified display scale.

+ traitCollectionWithDisplayGamut:

Returns a new trait collection containing only the specified display gamut trait.

+ traitCollectionWithLayoutDirection:

Returns a new trait collection containing only the specified layout direction trait.

+ traitCollectionWithPreferredContentSizeCategory:

Returns a new trait collection containing only the specified content size category trait.