Returns the appearance proxy for the receiver in a given containment hierarchy that has the passed trait collection.
Required.
SDKs
- iOS 8.0–9.0Deprecated
- Mac Catalyst 13.0–13.0Deprecated
Framework
- UIKit
Declaration
+ (instancetype)appearanceForTraitCollection:(UITrait Collection *)trait whenContainedIn:(Class<UIAppearance Container>)ContainerClass, ...;
Parameters
trait
The trait collection used for matching.
ContainerClass,
A nil-terminated list of appearance container classes.
Return Value
The appearance proxy for the receiver in a given containment hierarchy.
Discussion
This method throws an exception for any item in the var-args list that is not a Class object that conforms to the UIAppearance
protocol.