UIFont(descriptor: imgFontDescriptor!, size: 24.0) returns a font that matches the descriptor. If it cannot find a font match with your description, it returns the default font. Therefore, you cannot control your weight manually. It depends on which font you are using. If Font maintains this weight, it will return it.
One more thing you should use [UIFontDescriptorFamilyAttribute: "Helvetica"] . Thus, it will define the FontName database on FamilyName and your FontWeight.
The correct way to use const from Apple lib:
public let UIFontWeightUltraLight: CGFloat @available(iOS 8.2, *) public let UIFontWeightThin: CGFloat @available(iOS 8.2, *) public let UIFontWeightLight: CGFloat @available(iOS 8.2, *) public let UIFontWeightRegular: CGFloat @available(iOS 8.2, *) public let UIFontWeightMedium: CGFloat @available(iOS 8.2, *) public let UIFontWeightSemibold: CGFloat @available(iOS 8.2, *) public let UIFontWeightBold: CGFloat @available(iOS 8.2, *) public let UIFontWeightHeavy: CGFloat @available(iOS 8.2, *) public let UIFontWeightBlack: CGFloat*/
You must use http://iosfonts.com/ to determine how much weight the font supports this name.
In the case of Helvetica:
let traits = [UIFontWeightTrait : UIFontWeightLight]
source share