fix: password error prompt layout issue

This commit is contained in:
CMK 2021-03-05 20:45:48 +08:00
parent 087413009d
commit 652c286c71
2 changed files with 9 additions and 27 deletions

View File

@ -7,7 +7,7 @@
<key>CoreDataStack.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>10</integer>
<integer>7</integer>
</dict>
<key>Mastodon - RTL.xcscheme_^#shared#^_</key>
<dict>
@ -22,31 +22,10 @@
<key>Mastodon.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>12</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>DB427DD125BAA00100D1B89D</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>DB427DE725BAA00100D1B89D</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>DB427DF225BAA00100D1B89D</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>DB89B9F525C10FD0008580ED</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
<dict/>
</dict>
</plist>

View File

@ -220,6 +220,7 @@ final class MastodonRegisterViewController: UIViewController, NeedsDependency, O
}
extension MastodonRegisterViewController {
override func viewDidLoad() {
super.viewDidLoad()
@ -277,7 +278,7 @@ extension MastodonRegisterViewController {
passwordErrorPromptLabel.translatesAutoresizingMaskIntoConstraints = false
stackView.addSubview(passwordErrorPromptLabel)
NSLayoutConstraint.activate([
passwordErrorPromptLabel.topAnchor.constraint(equalTo: passwordTextField.bottomAnchor, constant: 6),
passwordErrorPromptLabel.topAnchor.constraint(equalTo: passwordCheckLabel.bottomAnchor, constant: 2),
passwordErrorPromptLabel.leadingAnchor.constraint(equalTo: passwordTextField.leadingAnchor),
passwordErrorPromptLabel.trailingAnchor.constraint(equalTo: passwordTextField.trailingAnchor),
])
@ -552,11 +553,13 @@ extension MastodonRegisterViewController {
avatarButton.addTarget(self, action: #selector(MastodonRegisterViewController.avatarButtonPressed(_:)), for: .touchUpInside)
signUpButton.addTarget(self, action: #selector(MastodonRegisterViewController.signUpButtonPressed(_:)), for: .touchUpInside)
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
plusIconImageView.layer.cornerRadius = plusIconImageView.frame.width/2
plusIconImageView.clipsToBounds = true
plusIconImageView.layer.cornerRadius = plusIconImageView.frame.width / 2
plusIconImageView.layer.masksToBounds = true
}
}
extension MastodonRegisterViewController: UITextFieldDelegate {