Skip to content

Commit

Permalink
Fix empty table placeholder for small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
reloni committed Sep 18, 2017
1 parent 0f2eea5 commit cbc5361
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Aika/Controls/TasksTableBackground.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ final class TasksTableBackground: UIView {
let subtitleLabel: UILabel = {
let lbl = Theme.Controls.label(withStyle: UIFontTextStyle.title2)
lbl.text = "Press \"+\" button to add new task"
lbl.adjustsFontSizeToFitWidth = true
lbl.minimumScaleFactor = 0.5
return lbl
}()

Expand All @@ -39,8 +41,9 @@ final class TasksTableBackground: UIView {
}

subtitleLabel.snp.makeConstraints {
$0.top.equalTo(titleLabel.snp.bottom).offset(20)
$0.centerX.equalTo(snp.centerX)
$0.top.equalTo(titleLabel.snp.lastBaseline)
$0.leading.equalTo(snp.leadingMargin)
$0.trailing.equalTo(snp.trailingMargin)
}
}
}

0 comments on commit cbc5361

Please sign in to comment.