UIButton
class UIButton : UIControl, NSCoding
-
Mechanica
Sets the background
colorto use for the specified buttonstate.Declaration
Swift
public func setBackgroundColor(_ color: UIColor, for state: UIControl.State = .normal)Parameters
colorThe background color to use for the specified state.
stateThe state that uses the specified image (defaults to normal.
UIButton Extension Reference