text alignment and mark fix

This commit is contained in:
Pfeil, Scott Robert 2019-08-12 15:28:06 -04:00
parent 1f98936143
commit d754944fcd
2 changed files with 13 additions and 2 deletions

View File

@ -178,6 +178,17 @@ public typealias ActionBlock = () -> Void
setLabel(label, withHTML: json?.optionalStringForKey("html"))
if let alignment = json?.optionalStringForKey("textAlignment") {
switch alignment {
case "center":
label.textAlignment = .center
case "trailing":
label.textAlignment = .right
default:
label.textAlignment = .left
}
}
if let backgroundColorHex = json?.optionalStringForKey(KeyBackgroundColor), !backgroundColorHex.isEmpty {
label.backgroundColor = UIColor.mfGet(forHex: backgroundColorHex)
}
@ -368,6 +379,7 @@ extension Label {
public func reset() {
text = nil
attributedText = nil
textAlignment = .left
originalAttributedString = nil
styleB2(true)
}

View File

@ -21,7 +21,7 @@ open class ThreeLayerTableViewController: MFProgrammaticTableViewController {
private var topViewBottomConstraint: NSLayoutConstraint?
private var bottomViewTopConstraint: NSLayoutConstraint?
//MARK: - MVMCoreViewProtocol
//MARK: - MFViewController
open override func updateViews() {
super.updateViews()
let width = view.bounds.width
@ -37,7 +37,6 @@ open class ThreeLayerTableViewController: MFProgrammaticTableViewController {
self.tableView?.reloadData()
}
//MARK: - MFViewController
open override func newDataBuildScreen() {
super.newDataBuildScreen()
createViewForTableHeader()