copy from Kevin's commit: aac5093c37
This commit is contained in:
parent
d380328913
commit
2f0a727d03
@ -13,8 +13,8 @@ open class CaretButton: MFCustomButton {
|
|||||||
// MARK: - Constants
|
// MARK: - Constants
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
|
|
||||||
private let CARET_VIEW_HEIGHT: Float = 10.8
|
private let CARET_VIEW_HEIGHT: Float = 10.5
|
||||||
private let CARET_VIEW_WIDTH: Float = 6.6
|
private let CARET_VIEW_WIDTH: Float = 6.5
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
|
|||||||
@ -74,9 +74,16 @@ public typealias CoreObjectActionLoadPresentDelegate = MVMCoreActionDelegateProt
|
|||||||
public var actionText: String?
|
public var actionText: String?
|
||||||
public var backText: String?
|
public var backText: String?
|
||||||
|
|
||||||
private var text: String? {
|
private var internalText: String = ""
|
||||||
willSet(newText) {
|
|
||||||
attributedText = NSAttributedString(string: newText ?? "")
|
public var text: String? {
|
||||||
|
get {
|
||||||
|
return internalText
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
guard let text = newValue else { return }
|
||||||
|
internalText = text
|
||||||
|
attributedText = NSAttributedString(string: text)
|
||||||
setAlternateNormalTextAttributes([NSAttributedString.Key.font: normalTextFont as Any])
|
setAlternateNormalTextAttributes([NSAttributedString.Key.font: normalTextFont as Any])
|
||||||
setAlternateActionTextAttributes([NSAttributedString.Key.font: actionTextFont as Any])
|
setAlternateActionTextAttributes([NSAttributedString.Key.font: actionTextFont as Any])
|
||||||
setAlternateNormalTextAttributes([NSAttributedString.Key.foregroundColor: normalTextColor as Any])
|
setAlternateNormalTextAttributes([NSAttributedString.Key.foregroundColor: normalTextColor as Any])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user