From 73b5d429b46424a34cbb9cb4a23fa84e373b2bcd Mon Sep 17 00:00:00 2001 From: Anton Efimenko Date: Tue, 19 Sep 2017 07:08:02 +0300 Subject: [PATCH] Fix empty table placeholder again --- Aika/Controls/TasksTableBackground.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Aika/Controls/TasksTableBackground.swift b/Aika/Controls/TasksTableBackground.swift index 25f9dcf..eceb742 100644 --- a/Aika/Controls/TasksTableBackground.swift +++ b/Aika/Controls/TasksTableBackground.swift @@ -12,6 +12,9 @@ final class TasksTableBackground: UIView { let titleLabel: UILabel = { let lbl = Theme.Controls.label(withStyle: UIFontTextStyle.title1) lbl.text = "No tasks" + lbl.adjustsFontSizeToFitWidth = true + lbl.minimumScaleFactor = 0.5 + lbl.textAlignment = .center return lbl }() @@ -20,6 +23,7 @@ final class TasksTableBackground: UIView { lbl.text = "Press \"+\" button to add new task" lbl.adjustsFontSizeToFitWidth = true lbl.minimumScaleFactor = 0.5 + lbl.textAlignment = .center return lbl }() @@ -38,10 +42,12 @@ final class TasksTableBackground: UIView { titleLabel.snp.makeConstraints { $0.center.equalTo(self.snp.center) + $0.leading.equalTo(snp.leadingMargin) + $0.trailing.equalTo(snp.trailingMargin) } subtitleLabel.snp.makeConstraints { - $0.top.equalTo(titleLabel.snp.lastBaseline) + $0.top.equalTo(titleLabel.snp.lastBaseline).offset(10) $0.leading.equalTo(snp.leadingMargin) $0.trailing.equalTo(snp.trailingMargin) }