BFButton

open class BFButton : UIButton

This class adds some useful functions to UIButton that cannot be in an extension.

  • Required init function.

    Declaration

    Swift

    public required init?(coder aDecoder: NSCoder)

    Parameters

    aDecoder

    NSCoder.

    Return Value

    The initialized instance.

  • Encodes added variables.

    Declaration

    Swift

    override open func encode(with aCoder: NSCoder)

    Parameters

    aCoder

    NSCoder.

  • Create an UIButton with a fade animation from image to highlightedImage on touch.

    Declaration

    Swift

    public init(frame: CGRect, image: UIImage, highlightedImage: UIImage, fadeDuration: TimeInterval)

    Parameters

    frame

    Button frame.

    image

    Button image.

    highlightedImage

    Button highlighted image.

    fadeDuration

    Fade duration.