fix code review notes
This commit is contained in:
@@ -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
|
||||
|
||||
+4
-4
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user