From 2bf40b3d09ef4871b3420e8db6b0f76cc7830a30 Mon Sep 17 00:00:00 2001 From: sunxiaojian Date: Sat, 24 Apr 2021 20:10:00 -0700 Subject: [PATCH] fix: pick scene UI layout issue --- .../PickServer/MastodonPickServerViewController.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Mastodon/Scene/Onboarding/PickServer/MastodonPickServerViewController.swift b/Mastodon/Scene/Onboarding/PickServer/MastodonPickServerViewController.swift index 241a597c1..39ed714d7 100644 --- a/Mastodon/Scene/Onboarding/PickServer/MastodonPickServerViewController.swift +++ b/Mastodon/Scene/Onboarding/PickServer/MastodonPickServerViewController.swift @@ -22,7 +22,6 @@ final class MastodonPickServerViewController: UIViewController, NeedsDependency private var expandServerDomainSet = Set() private let emptyStateView = PickServerEmptyStateView() - private let emptyStateViewHPadding: CGFloat = 4 // UIView's readableContentGuide is 4pt smaller then UITableViewCell's let tableViewTopPaddingView = UIView() // fix empty state view background display when tableView bounce scrolling var tableViewTopPaddingViewHeightLayoutConstraint: NSLayoutConstraint! @@ -90,8 +89,8 @@ extension MastodonPickServerViewController { view.addSubview(emptyStateView) NSLayoutConstraint.activate([ emptyStateView.topAnchor.constraint(equalTo: view.topAnchor), - emptyStateView.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor, constant: emptyStateViewHPadding), - emptyStateView.trailingAnchor.constraint(equalTo: view.readableContentGuide.trailingAnchor, constant: -emptyStateViewHPadding), + emptyStateView.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor), + emptyStateView.trailingAnchor.constraint(equalTo: view.readableContentGuide.trailingAnchor), nextStepButton.topAnchor.constraint(equalTo: emptyStateView.bottomAnchor, constant: 21), ])