comments
This commit is contained in:
parent
c0d85694c6
commit
cf6db73acb
@ -38,6 +38,7 @@ open class Styler {
|
|||||||
case B3
|
case B3
|
||||||
case B20
|
case B20
|
||||||
|
|
||||||
|
/// Returns the font size of the current enum case.
|
||||||
public func pointSize() -> CGFloat {
|
public func pointSize() -> CGFloat {
|
||||||
switch self {
|
switch self {
|
||||||
case .H1:
|
case .H1:
|
||||||
@ -82,6 +83,7 @@ open class Styler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Determines if the selected font case is bold or regular.
|
||||||
public func isBold() -> Bool {
|
public func isBold() -> Bool {
|
||||||
|
|
||||||
switch self {
|
switch self {
|
||||||
@ -111,6 +113,7 @@ open class Styler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Determines if the current enum is a legacy or modern font.
|
||||||
public func isLegacyFont() -> Bool {
|
public func isLegacyFont() -> Bool {
|
||||||
|
|
||||||
switch self {
|
switch self {
|
||||||
@ -140,6 +143,7 @@ open class Styler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the font based on the declared enum case.
|
||||||
public func getFont(_ genericScaling: Bool = true) -> UIFont? {
|
public func getFont(_ genericScaling: Bool = true) -> UIFont? {
|
||||||
|
|
||||||
let size = genericScaling ? sizeFontGeneric(forCurrentDevice: pointSize()) : pointSize()
|
let size = genericScaling ? sizeFontGeneric(forCurrentDevice: pointSize()) : pointSize()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user