strikethrough fix
warning fix.
This commit is contained in:
parent
f2db8528a7
commit
5ebc4b0e31
@ -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)
|
||||||
|
|||||||
@ -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]?) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user