Skip to content

Commit

Permalink
adding font MalertAction attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
vitormesquita committed Oct 26, 2018
1 parent 62f7813 commit 4f7c387
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Malert.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Pod::Spec.new do |s|
s.name = 'Malert'
s.version = '3.1.1'
s.version = '3.1.2'
s.summary = 'A simple, easy and very customizable alert'
s.description = <<-DESC
Malert came to facilitate make custom alert views, introducing as `UIAlertController`.
Expand Down
1 change: 1 addition & 0 deletions Malert/Classes/MalertButtonView/MalertAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class MalertAction {
public var cornerRadius: CGFloat?
public var borderColor: UIColor?
public var borderWidth: CGFloat?
public var font: UIFont?

public init(title: String, actionBlock: (() -> ())? = nil) {
self.title = title
Expand Down
4 changes: 4 additions & 0 deletions Malert/Classes/MalertButtonView/MalertButtonView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ extension MalertButtonView {

setTitle(action.title, for: .normal)
addTarget(self, action: #selector(MalertButtonView.buttonPressedAction(button:)), for: .touchUpInside)

if let font = action.font {
self.titleLabel?.font = font
}
}
}

Expand Down

0 comments on commit 4f7c387

Please sign in to comment.