Instance Method
setValue(_:for:)
iOS 8.0+
iPadOS 8.0+
Mac Catalyst 8.0+
macOS 10.9+
tvOS 9.0+
watchOS 2.0+
Set the value of one of the properties, using an enumeration value instead of a property name.
Discussion
The calendar, timeZone, isLeapMonth, and isRepeatedDay properties cannot be set by this method.