strikethrough fix

warning fix.
This commit is contained in:
Pfeil, Scott Robert 2019-07-24 15:38:13 -04:00
parent f2db8528a7
commit 5ebc4b0e31
2 changed files with 7 additions and 5 deletions

View File

@ -217,7 +217,7 @@ public typealias ActionBlock = () -> Void
case "strikethrough":
attributedString.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.thick.rawValue, range: range)
attributedString.addAttribute(.baselineOffset, value: 0, range: range)
case "color":
if let colorHex = attribute.optionalStringForKey(KeyTextColor), !colorHex.isEmpty {
attributedString.removeAttribute(.foregroundColor, range: range)

View File

@ -17,12 +17,14 @@ import UIKit
guard scrollView.superview == nil else {
return
}
translatesAutoresizingMaskIntoConstraints = false
scrollView.translatesAutoresizingMaskIntoConstraints = false
addConstrainedView(scrollView)
scrollView.addSubview(contentView)
if let constraints = (NSLayoutConstraint.pinView(toSuperview: contentView, useMargins: false) as NSDictionary).allValues as? [NSLayoutConstraint] {
NSLayoutConstraint.activate(constraints)
}
contentView.widthAnchor.constraint(equalTo: scrollView.widthAnchor, multiplier: 1.0, constant: -0.1).isActive = true
NSLayoutConstraint.constraintPinSubview(toSuperview: contentView)
let constraint = contentView.widthAnchor.constraint(equalTo: scrollView.widthAnchor, multiplier: 1.0)
constraint.priority = UILayoutPriority(rawValue: 999)
constraint.isActive = true
}
open override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {