UIButton

extension UIButton
  • Sets the background color to use for the specified button state.

    Declaration

    Swift

    public func setBackgroundColor(_ color: UIColor, for state: UIControl.State)

    Parameters

    color

    The background color to use for the specified state.

    state

    The state that uses the specified image.