Skip to content

Commit

Permalink
Merge pull request #38 from reloni/develop
Browse files Browse the repository at this point in the history
Fix empty table placeholder again
  • Loading branch information
reloni authored Sep 19, 2017
2 parents f7495da + 73b5d42 commit 0826263
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Aika/Controls/TasksTableBackground.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}()

Expand All @@ -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
}()

Expand All @@ -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)
}
Expand Down

0 comments on commit 0826263

Please sign in to comment.