Skip to content

Commit 78b96e5

Browse files
migrantmats-claassen
authored andcommitted
support setting cancel view's title color (#129)
1 parent 98ffe9f commit 78b96e5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Source/ActionController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ open class ActionController<ActionViewType: UICollectionViewCell, ActionDataType
362362

363363
let cancelButton = UIButton(frame: CGRect(x: 0, y: 0, width: 100, height: settings.cancelView.height))
364364
cancelButton.addTarget(self, action: #selector(ActionController.cancelButtonDidTouch(_:)), for: .touchUpInside)
365+
cancelButton.setTitleColor(settings.cancelView.titleColor, for: UIControl.State())
365366
cancelButton.setTitle(settings.cancelView.title, for: UIControl.State())
366367
cancelButton.translatesAutoresizingMaskIntoConstraints = false
367368

Source/ActionControllerSettings.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ public struct ActionControllerSettings {
8181
* The cancel view's background color. Its default value is `UIColor.blackColor().colorWithAlphaComponent(0.8)`.
8282
*/
8383
public var backgroundColor = UIColor.black.withAlphaComponent(0.8)
84+
/**
85+
* The cancel view's title color. Its default value is `UIColor.white`.
86+
*/
87+
public var titleColor = UIColor.white
8488
/**
8589
* A Boolean value that determines whether the collection view can be partially covered by the
8690
* cancel view when it is pulled down. Its default value is `true`

0 commit comments

Comments
 (0)