From db48e56dd9a07ee287ee499e665a9a22b35a19f2 Mon Sep 17 00:00:00 2001 From: ihugo Date: Sun, 25 Apr 2021 15:51:45 +0800 Subject: [PATCH] refactor: remove negative constraints --- Mastodon/Scene/Report/ReportHeaderView.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Mastodon/Scene/Report/ReportHeaderView.swift b/Mastodon/Scene/Report/ReportHeaderView.swift index 414196e86..8a6d957c8 100644 --- a/Mastodon/Scene/Report/ReportHeaderView.swift +++ b/Mastodon/Scene/Report/ReportHeaderView.swift @@ -70,7 +70,7 @@ final class ReportHeaderView: UIView { stackview.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ - stackview.safeAreaLayoutGuide.topAnchor.constraint( + stackview.topAnchor.constraint( equalTo: self.topAnchor, constant: ReportView.verticalMargin ), @@ -78,13 +78,13 @@ final class ReportHeaderView: UIView { equalTo: self.readableContentGuide.leadingAnchor, constant: ReportView.horizontalMargin ), - stackview.bottomAnchor.constraint( - equalTo: self.bottomAnchor, - constant: -1 * ReportView.verticalMargin + self.bottomAnchor.constraint( + equalTo: stackview.bottomAnchor, + constant: ReportView.verticalMargin ), - stackview.trailingAnchor.constraint( - equalTo: self.readableContentGuide.trailingAnchor, - constant: -1 * ReportView.horizontalMargin + self.readableContentGuide.trailingAnchor.constraint( + equalTo: stackview.trailingAnchor, + constant: ReportView.horizontalMargin ) ]) }