Specifies the default value associated with the specified key.
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- Core Animation
The name of one of the receiver’s properties.
The default value for the named property. Returns
nil if no default value has been set.
If you define custom properties for a layer but do not set a value, this method returns a suitable “zero” default value based on the expected value of the
key. For example, if the value for
key is a
CGSize struct, the method returns a size struct containing (0.0,0.0) wrapped in an
NSValue object. For a
CGRect an empty rectangle is returned. For
CATransform3D, the appropriate identity matrix is returned.
key is not a known for property of the class, the result of the method is undefined.