Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions SwiftyButton/PressableButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ open class PressableButton: UIButton {
}

public struct ColorSet {
let button: UIColor
let shadow: UIColor
var button: UIColor
var shadow: UIColor

public init(button: UIColor, shadow: UIColor) {
self.button = button
Expand All @@ -47,6 +47,23 @@ open class PressableButton: UIButton {
}
}

@IBInspectable
public var buttonColor:UIColor? {
didSet {
if let buttonColor = buttonColor {
colors.button = buttonColor
}
}
}
@IBInspectable
public var shadowColor:UIColor? {
didSet {
if let shadowColor = shadowColor {
colors.shadow = shadowColor
}
}
}

@IBInspectable
public var shadowHeight: CGFloat = Defaults.shadowHeight {
didSet {
Expand Down