diff --git a/CardParts.podspec b/CardParts.podspec index d7cb3194..e82f3309 100644 --- a/CardParts.podspec +++ b/CardParts.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'CardParts' - s.version = '2.9.0' + s.version = '2.10.0' s.platform = :ios s.summary = 'iOS Card UI framework.' diff --git a/CardParts/src/Classes/Card Parts/CardPartTitleDescriptionView.swift b/CardParts/src/Classes/Card Parts/CardPartTitleDescriptionView.swift index fa5c2335..4c6f74c7 100644 --- a/CardParts/src/Classes/Card Parts/CardPartTitleDescriptionView.swift +++ b/CardParts/src/Classes/Card Parts/CardPartTitleDescriptionView.swift @@ -51,6 +51,12 @@ public class CardPartTitleDescriptionView : UIView, CardPartView { leftDescriptionLabel.attributedText = leftDescriptionAttributedText } } + + public var leftTitleAttributedText: NSAttributedString? { + didSet { + leftTitleLabel.attributedText = leftTitleAttributedText + } + } public var rightTitleText: String? { didSet { @@ -69,6 +75,12 @@ public class CardPartTitleDescriptionView : UIView, CardPartView { rightDescriptionLabel.attributedText = rightDescriptionAttributedText } } + + public var rightTitleAttributedText: NSAttributedString? { + didSet { + rightTitleLabel.attributedText = rightTitleAttributedText + } + } public var leftTitleFont: UIFont = CardParts.theme.leftTitleFont { didSet { @@ -389,11 +401,23 @@ extension Reactive where Base: CardPartTitleDescriptionView { } } + public var leftTitleAttributedText: Binder{ + return Binder(self.base) { (titleDescriptionView, leftTitleAttributedText) -> () in + titleDescriptionView.leftTitleAttributedText = leftTitleAttributedText + } + } + public var rightDescriptionAttributedText: Binder{ return Binder(self.base) { (titleDescriptionView, rightDescriptionAttributedText) -> () in titleDescriptionView.rightDescriptionAttributedText = rightDescriptionAttributedText } } + + public var rightTitleAttributedText: Binder{ + return Binder(self.base) { (titleDescriptionView, rightTitleAttributedText) -> () in + titleDescriptionView.rightTitleAttributedText = rightTitleAttributedText + } + } public var rightTitleText: Binder{ return Binder(self.base) { (titleDescriptionView, rightTitleText) -> () in