#if os(iOS)
import UIKit
typealias HSColor = UIColor
typealias HSFont = UIFont
typealias HSImage = UIImage
typealias HSView = UIView
#elseif os(macOS)
import AppKit
typealias HSColor = NSColor
typealias HSFont = NSFont
typealias HSImage = NSImage
typealias HSView = NSView
extension NSFont {
public class func italicSystemFont(ofSize fontSize: CGFloat) -> NSFont {
let f = NSFontManager.shared.font(withFamily: "System",
traits: .italicFontMask,
weight: 0,
size: fontSize)
return f!
}
}
extension NSColor {
static var darkText: HSColor { return HSColor.black }
static var lightText: HSColor { return HSColor.white }
static var label: HSColor { return HSColor.labelColor }
}
#endif