Attachment menu improvements

This commit is contained in:
Ilya Laktyushin
2022-02-26 17:48:25 +04:00
parent 5e84216346
commit ec8702ed07
77 changed files with 4533 additions and 325 deletions

View File

@@ -31,10 +31,11 @@ public struct Font {
case medium
case semibold
case bold
case heavy
var isBold: Bool {
switch self {
case .medium, .semibold, .bold:
case .medium, .semibold, .bold, .heavy:
return true
default:
return false
@@ -51,6 +52,8 @@ public struct Font {
return .semibold
case .bold:
return .bold
case .heavy:
return .heavy
default:
return .regular
}
@@ -185,6 +188,11 @@ public struct Font {
}
}
public static func heavy(_ size: CGFloat) -> UIFont {
return self.with(size: size, design: .regular, weight: .heavy, traits: [])
}
public static func light(_ size: CGFloat) -> UIFont {
if #available(iOS 8.2, *) {
return UIFont.systemFont(ofSize: size, weight: UIFont.Weight.light)