text alignment and mark fix
This commit is contained in:
parent
1f98936143
commit
d754944fcd
@ -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)
|
||||
}
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user