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:
Родитель
72af60ce3d
Коммит
dd22f4b821
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
// MARK: MSColors
|
// MARK: MSColors
|
||||||
|
|
||||||
public struct MSColors {
|
@objcMembers
|
||||||
|
public final class MSColors: NSObject {
|
||||||
// MARK: Primary
|
// MARK: Primary
|
||||||
|
|
||||||
/// #0078D4
|
/// #0078D4
|
||||||
|
@ -186,6 +187,10 @@ public struct MSColors {
|
||||||
public static let background: UIColor = white
|
public static let background: UIColor = white
|
||||||
public static let backgroundSelected: UIColor = backgroundGray
|
public static let backgroundSelected: UIColor = backgroundGray
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private override init() {
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - MSTextColorStyle
|
// MARK: - MSTextColorStyle
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
// Licensed under the MIT License.
|
// Licensed under the MIT License.
|
||||||
//
|
//
|
||||||
|
|
||||||
public struct MSFonts {
|
@objcMembers
|
||||||
|
public final class MSFonts: NSObject {
|
||||||
/// Semibold 28pt
|
/// Semibold 28pt
|
||||||
public static var title1: UIFont { return UIFont.preferredFont(forTextStyle: .title1).withWeight(.semibold) }
|
public static var title1: UIFont { return UIFont.preferredFont(forTextStyle: .title1).withWeight(.semibold) }
|
||||||
/// Semibold 22pt
|
/// Semibold 22pt
|
||||||
|
@ -20,6 +21,10 @@ public struct MSFonts {
|
||||||
public static var caption1: UIFont { return .preferredFont(forTextStyle: .caption1) }
|
public static var caption1: UIFont { return .preferredFont(forTextStyle: .caption1) }
|
||||||
/// Regular 11pt
|
/// Regular 11pt
|
||||||
public static var caption2: UIFont { return .preferredFont(forTextStyle: .caption2) }
|
public static var caption2: UIFont { return .preferredFont(forTextStyle: .caption2) }
|
||||||
|
|
||||||
|
private override init() {
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc public enum MSTextStyle: Int, CaseIterable {
|
@objc public enum MSTextStyle: Int, CaseIterable {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче