Verified Commit e9777a93 authored by Geoff Pado's avatar Geoff Pado

Add underline to prompt button

parent ef7cafcb
......@@ -7,11 +7,16 @@ class PromptButton: UIButton {
init(title string: String) {
super.init(frame: .zero)
titleLabel?.font = .appFont(forTextStyle: .headline)
titleLabel?.adjustsFontForContentSizeCategory = true
let attributes: [NSAttributedString.Key : Any] = [
.font: UIFont.appFont(forTextStyle: .headline),
.foregroundColor: UIColor.white,
.underlineStyle: NSUnderlineStyle.single.rawValue
let underlinedTitle = NSAttributedString(string: string, attributes: attributes)
setAttributedTitle(underlinedTitle, for: .normal)
setTitleColor(.white, for: .normal)
setTitle(string, for: .normal)
titleLabel?.adjustsFontForContentSizeCategory = true
translatesAutoresizingMaskIntoConstraints = false
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment