Why does the function UILabel.setIcon(...) change the alignment of the text on the label to .center? The documentation on these functions do not specify that the alignment is changed. I found this to be unexpected behavior and I don't want to the alignment on my label to be changed when using this function.
Found in SwiftIcons.swift in the following functions:
setIcon(prefixText: String, prefixTextColor: UIColor = .black, icon: FontType?, iconColor: UIColor = .black, postfixText: String, postfixTextColor: UIColor = .black, size: CGFloat?, iconSize: CGFloat? = nil) {
// ...
textAlignment = .center
}
setIcon(prefixText: String, prefixTextFont: UIFont, prefixTextColor: UIColor = .black, icon: FontType?, iconColor: UIColor = .black, postfixText: String, postfixTextFont: UIFont, postfixTextColor: UIColor = .black, iconSize: CGFloat? = nil) {
// ...
textAlignment = .center
}
Is there a reason why the alignment is changed? If not I would suggest removing the line.
Why does the function
UILabel.setIcon(...)change the alignment of the text on the label to.center? The documentation on these functions do not specify that the alignment is changed. I found this to be unexpected behavior and I don't want to the alignment on my label to be changed when using this function.Found in
SwiftIcons.swiftin the following functions:Is there a reason why the alignment is changed? If not I would suggest removing the line.