MUButton

@IBDesignable
open class MUButton : MUNibView

Class that act like UIButton with more customizable options.

  • The object that acts as the delegate of the button.

    Declaration

    Swift

    @IBOutlet
    public weak var delegate: MUButtonDelegate?
  • The current title that is displayed by the button.

    Declaration

    Swift

    @IBInspectable
    open var title: String { get set }
  • The button’s font.

    Declaration

    Swift

    @objc
    open dynamic var titleFont: UIFont { get set }
  • The button’s horizontal alignment.

    Declaration

    Swift

    @objc
    open dynamic var titleAlignment: UIControl.ContentHorizontalAlignment { get set }
  • Optional: The IBInspectable version of the button’s horizontal alignment.

    Declaration

    Swift

    @IBInspectable
    open dynamic var titleAlignmentInt: Int { get set }
  • The button’s title color.

    Declaration

    Swift

    @IBInspectable
    open dynamic var titleColor: UIColor { get set }
  • The button’s highlighted title color.

    Declaration

    Swift

    @IBInspectable
    open dynamic var titleHighlightedColor: UIColor { get set }
  • The activity indicator’s color.

    Declaration

    Swift

    @IBInspectable
    open dynamic var progressColor: UIColor { get set }
  • Show or hide the progress indicator.

    Declaration

    Swift

    @IBInspectable
    open dynamic var isLoading: Bool { get set }
  • The button’s state. (Won’t work with application’s state and reserved state).

    Declaration

    Swift

    @objc
    open dynamic var state: UIControl.State { get set }
  • The button’s alpha value for disabled state.

    Declaration

    Swift

    @IBInspectable
    open dynamic var disabledAlphaValue: CGFloat { get set }
  • The button’s background color.

    Declaration

    Swift

    @IBInspectable
    open dynamic var buttonBackgroundColor: UIColor { get set }
  • The button’s border color.

    Declaration

    Swift

    @IBInspectable
    open dynamic var borderColor: UIColor { get set }
  • The button’s border width.

    Declaration

    Swift

    @IBInspectable
    open dynamic var borderWidth: CGFloat { get set }
  • The button’s corner radius.

    Declaration

    Swift

    @IBInspectable
    open dynamic var cornerRadius: CGFloat { get set }
  • The button’s vertical padding.

    Declaration

    Swift

    @IBInspectable
    open dynamic var verticalPadding: CGFloat { get set }
  • The button’s horizontal padding.

    Declaration

    Swift

    @IBInspectable
    open dynamic var horizontalPadding: CGFloat { get set }
  • Default setup to load the view from a xib file.

    Declaration

    Swift

    override open func xibSetup()
  • The natural size for the receiving view, considering only properties of the view itself.

    Declaration

    Swift

    override open var intrinsicContentSize: CGSize { get }