chore(onboarding): Decrease spacing between title and top of WelcomeViewController
This commit is contained in:
parent
9e1dbe1dff
commit
a935cd83bb
|
@ -13,6 +13,10 @@ import MastodonLocalization
|
|||
|
||||
final class WelcomeViewController: UIViewController, NeedsDependency {
|
||||
|
||||
private enum Constants {
|
||||
static let topAnchorInset: CGFloat = 20
|
||||
}
|
||||
|
||||
weak var context: AppContext! { willSet { precondition(!isViewLoaded) } }
|
||||
weak var coordinator: SceneCoordinator! { willSet { precondition(!isViewLoaded) } }
|
||||
|
||||
|
@ -131,7 +135,7 @@ extension WelcomeViewController {
|
|||
}
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
pageViewController.view.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
|
||||
pageViewController.view.topAnchor.constraint(equalTo: view.topAnchor, constant: computedTopAnchorInset),
|
||||
pageViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
view.trailingAnchor.constraint(equalTo: pageViewController.view.trailingAnchor),
|
||||
buttonContainer.topAnchor.constraint(equalTo: pageViewController.view.bottomAnchor, constant: 16),
|
||||
|
@ -170,6 +174,10 @@ extension WelcomeViewController {
|
|||
setupIllustrationLayout()
|
||||
setupButtonShadowView()
|
||||
}
|
||||
|
||||
private var computedTopAnchorInset: CGFloat {
|
||||
(navigationController?.navigationBar.bounds.height ?? UINavigationBar().bounds.height) + Constants.topAnchorInset
|
||||
}
|
||||
}
|
||||
|
||||
extension WelcomeViewController {
|
||||
|
|
Loading…
Reference in New Issue