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": case "strikethrough":
attributedString.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.thick.rawValue, range: range) attributedString.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.thick.rawValue, range: range)
attributedString.addAttribute(.baselineOffset, value: 0, range: range)
case "color": case "color":
if let colorHex = attribute.optionalStringForKey(KeyTextColor), !colorHex.isEmpty { if let colorHex = attribute.optionalStringForKey(KeyTextColor), !colorHex.isEmpty {
attributedString.removeAttribute(.foregroundColor, range: range) attributedString.removeAttribute(.foregroundColor, range: range)

View File

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