ahmedattia213
5/21/2019 - 8:26 PM

UILabel+helper

import UIKit

extension UILabel {
    convenience init(text: String? , font: UIFont?, color: UIColor?,textAlignment: NSTextAlignment? = nil, numberOfLines: Int? = 1 ) {
        self.init(frame: .zero)
        self.text = text
        self.font = font
        self.textColor = color
        self.textAlignment = textAlignment ?? .left
        self.numberOfLines = numberOfLines ?? 1
    }
}