Variable fonts in Swift

As described in "The details of UI typography," the system font is now variable, implicating that its weight can be scaled between standard values from 100 - 900.

Is there a way I can achieve this in UIKit?

My overall goal is to animate text from one standard font weight to another.
Answered by Systems Engineer in 619636022
As explained, you can use kCTFontVariationAttribute to control that.
Accepted Answer
As explained, you can use kCTFontVariationAttribute to control that.
Can anyone show an example of how this works? The WWDC sessions doesn't show the code, and I can't get the Variation Attributes I'm adding to a system font to do anything.
Variable fonts in Swift
 
 
Q