UIButton

class UIButton : UIControl, NSCoding
  • SwifterSwift: Image of disabled state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var imageForDisabled: UIImage? { get set }
  • SwifterSwift: Image of highlighted state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var imageForHighlighted: UIImage? { get set }
  • SwifterSwift: Image of normal state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var imageForNormal: UIImage? { get set }
  • SwifterSwift: Image of selected state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var imageForSelected: UIImage? { get set }
  • SwifterSwift: Title color of disabled state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var titleColorForDisabled: UIColor? { get set }
  • SwifterSwift: Title color of highlighted state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var titleColorForHighlighted: UIColor? { get set }
  • SwifterSwift: Title color of normal state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var titleColorForNormal: UIColor? { get set }
  • SwifterSwift: Title color of selected state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var titleColorForSelected: UIColor? { get set }
  • SwifterSwift: Title of disabled state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var titleForDisabled: String? { get set }
  • SwifterSwift: Title of highlighted state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var titleForHighlighted: String? { get set }
  • SwifterSwift: Title of normal state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var titleForNormal: String? { get set }
  • SwifterSwift: Title of selected state for button; also inspectable from Storyboard.

    Declaration

    Swift

    @IBInspectable
    public var titleForSelected: String? { get set }
  • SwifterSwift: Set image for all states.

    Declaration

    Swift

    public func setImageForAllStates(_ image: UIImage)

    Parameters

    image

    UIImage.

  • SwifterSwift: Set title color for all states.

    Declaration

    Swift

    public func setTitleColorForAllStates(_ color: UIColor)

    Parameters

    color

    UIColor.

  • SwifterSwift: Set title for all states.

    Declaration

    Swift

    public func setTitleForAllStates(_ title: String)

    Parameters

    title

    title string.

  • SwifterSwift: Center align title text and image on UIButton

    Declaration

    Swift

    public func centerTextAndImage(spacing: CGFloat)

    Parameters

    spacing

    spacing between UIButton title text and UIButton Image.