UIButton
public extension UIButton
-
SwifterSwift: Image of disabled state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var imageForDisabled: UIImage? { get set }
-
SwifterSwift: Image of highlighted state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var imageForHighlighted: UIImage? { get set }
-
SwifterSwift: Image of normal state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var imageForNormal: UIImage? { get set }
-
SwifterSwift: Image of selected state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var imageForSelected: UIImage? { get set }
-
SwifterSwift: Title color of disabled state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var titleColorForDisabled: UIColor? { get set }
-
SwifterSwift: Title color of highlighted state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var titleColorForHighlighted: UIColor? { get set }
-
SwifterSwift: Title color of normal state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var titleColorForNormal: UIColor? { get set }
-
SwifterSwift: Title color of selected state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var titleColorForSelected: UIColor? { get set }
-
SwifterSwift: Title of disabled state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var titleForDisabled: String? { get set }
-
SwifterSwift: Title of highlighted state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var titleForHighlighted: String? { get set }
-
SwifterSwift: Title of normal state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var titleForNormal: String? { get set }
-
SwifterSwift: Title of selected state for button; also inspectable from Storyboard.
Declaration
Swift
@IBInspectable var titleForSelected: String? { get set }
-
SwifterSwift: Set image for all states.
Declaration
Swift
func setImageForAllStates(_ image: UIImage)
Parameters
image
UIImage.
-
SwifterSwift: Set title color for all states.
Declaration
Swift
func setTitleColorForAllStates(_ color: UIColor)
Parameters
color
UIColor.
-
SwifterSwift: Set title for all states.
Declaration
Swift
func setTitleForAllStates(_ title: String)
Parameters
title
title string.
-
SwifterSwift: Center align title text and image
Declaration
Swift
func centerTextAndImage(imageAboveText: Bool = false, spacing: CGFloat)
Parameters
imageAboveText
set true to make image above title text, default is false, image on left of text
spacing
spacing between title text and image.