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