Merged PR 251300: Made MSColors and MSFonts classes instead of structs and added attributes to support Objective-C

Made MSColors and MSFonts classes instead of structs and added attributes to support Objective-C

Related work items: #705414
This commit is contained in:
Vlad Filyakov 2019-04-02 22:34:30 +00:00
Родитель 72af60ce3d
Коммит dd22f4b821
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -5,7 +5,8 @@
// MARK: MSColors
public struct MSColors {
@objcMembers
public final class MSColors: NSObject {
// MARK: Primary
/// #0078D4
@ -186,6 +187,10 @@ public struct MSColors {
public static let background: UIColor = white
public static let backgroundSelected: UIColor = backgroundGray
}
private override init() {
super.init()
}
}
// MARK: - MSTextColorStyle

Просмотреть файл

@ -3,7 +3,8 @@
// Licensed under the MIT License.
//
public struct MSFonts {
@objcMembers
public final class MSFonts: NSObject {
/// Semibold 28pt
public static var title1: UIFont { return UIFont.preferredFont(forTextStyle: .title1).withWeight(.semibold) }
/// Semibold 22pt
@ -20,6 +21,10 @@ public struct MSFonts {
public static var caption1: UIFont { return .preferredFont(forTextStyle: .caption1) }
/// Regular 11pt
public static var caption2: UIFont { return .preferredFont(forTextStyle: .caption2) }
private override init() {
super.init()
}
}
@objc public enum MSTextStyle: Int, CaseIterable {