fix code review notes

This commit is contained in:
2020-12-24 11:37:00 +03:00
parent 102c15ca07
commit 2e84f5cb2d
4 changed files with 17 additions and 14 deletions
@@ -26,15 +26,10 @@ import UIKit.UIColor
/// Base set of attributes to configure appearance of text.
open class BaseTextAttributes {
/// Text font.
public let font: UIFont
/// Text color.
public let color: UIColor
/// Text alignment.
public let alignment: NSTextAlignment
/// Paragraph line height.
public let lineHeightMultiple: CGFloat
/// Number of lines for labels.
public let numberOfLines: Int
public init(font: UIFont,
@@ -42,6 +37,7 @@ open class BaseTextAttributes {
alignment: NSTextAlignment,
lineHeightMultiple: CGFloat,
numberOfLines: Int) {
self.font = font
self.color = color
self.alignment = alignment
@@ -34,11 +34,11 @@ extension UILabel: BaseTextAttributesConfigurable {
}
public func set(color: UIColor) {
self.textColor = color
textColor = color
}
public func set(alignment: NSTextAlignment) {
self.textAlignment = alignment
textAlignment = alignment
}
}
@@ -48,10 +48,10 @@ extension UITextField: BaseTextAttributesConfigurable {
}
public func set(color: UIColor) {
self.textColor = color
textColor = color
}
public func set(alignment: NSTextAlignment) {
self.textAlignment = alignment
textAlignment = alignment
}
}