chore: update constraints

This commit is contained in:
jk234ert 2021-02-23 11:19:10 +08:00
parent 85ceb48003
commit 4fafb3835d
1 changed files with 6 additions and 6 deletions

View File

@ -57,7 +57,7 @@ extension WelcomeViewController {
view.addSubview(logoImageView)
NSLayoutConstraint.activate([
logoImageView.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor, constant: 35),
logoImageView.trailingAnchor.constraint(equalTo: view.readableContentGuide.trailingAnchor, constant: -35),
view.readableContentGuide.trailingAnchor.constraint(equalTo: logoImageView.trailingAnchor, constant: 35),
logoImageView.topAnchor.constraint(equalTo: view.readableContentGuide.topAnchor, constant: 46),
logoImageView.heightAnchor.constraint(equalTo: logoImageView.widthAnchor, multiplier: 65.4/265.1),
])
@ -65,7 +65,7 @@ extension WelcomeViewController {
view.addSubview(sloganLabel)
NSLayoutConstraint.activate([
sloganLabel.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor, constant: 16),
sloganLabel.trailingAnchor.constraint(equalTo: view.readableContentGuide.trailingAnchor, constant: -16),
view.readableContentGuide.trailingAnchor.constraint(equalTo: sloganLabel.trailingAnchor, constant: 16),
sloganLabel.topAnchor.constraint(equalTo: logoImageView.bottomAnchor, constant: 168),
])
@ -73,12 +73,12 @@ extension WelcomeViewController {
view.addSubview(signUpButton)
NSLayoutConstraint.activate([
signInButton.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor, constant: 12),
signInButton.trailingAnchor.constraint(equalTo: view.readableContentGuide.trailingAnchor, constant: -12),
signInButton.bottomAnchor.constraint(equalTo: view.readableContentGuide.bottomAnchor, constant: -11),
view.readableContentGuide.trailingAnchor.constraint(equalTo: signInButton.trailingAnchor, constant: 12),
view.readableContentGuide.bottomAnchor.constraint(equalTo: signInButton.bottomAnchor, constant: 11),
signUpButton.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor, constant: 12),
signUpButton.trailingAnchor.constraint(equalTo: view.readableContentGuide.trailingAnchor, constant: -12),
signUpButton.bottomAnchor.constraint(equalTo: signInButton.topAnchor, constant: -5)
view.readableContentGuide.trailingAnchor.constraint(equalTo: signUpButton.trailingAnchor, constant: 12),
signInButton.topAnchor.constraint(equalTo: signUpButton.bottomAnchor, constant: 5)
])
}