UIButton

extension UIButton
  • Set a button title with background color for a button state. The background image of the button would be generated from the given background color.

    Declaration

    Swift

    public func setTitle(_ title: String, backgroundColor: UIColor, for state: UIControl.State)