-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Review] Changes by danxoo #6
base: develop
Are you sure you want to change the base?
Conversation
a8f3537
to
9fa23e4
Compare
9fa23e4
to
cd20c0f
Compare
@@ -11,6 +11,8 @@ final class AutorizeViewController : UIViewController{ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нет разделения логики на слои
// Call the delegate method | ||
delegate?.saveButtonTapped(username: username, password: password) | ||
// Закрываем представление настроек | ||
dismiss(animated: true, completion: nil) | ||
} | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
давай протокол снизу вынесем в отдельный файл
@@ -69,7 +71,7 @@ final class AutorizeViewController : UIViewController{ | |||
|
|||
ask_password_Field.text = "Введите пароль:" | |||
view.addSubview(ask_password_Field) | |||
|
|||
ask_password_Field.translatesAutoresizingMaskIntoConstraints = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давай будем называть свойства по camelCase, как в Swift принято
ask_password_Field
-> askPasswordField
@@ -187,7 +189,7 @@ final class AutorizeViewController : UIViewController{ | |||
let password = passwordTextField.text ?? "" | |||
let password2 = password2TextField.text ?? "" | |||
// Получаем значение поля ввода пароля или оставляем пустую строку, если поле пустое | |||
// Добавлено условие для проверки, что оба поля имени пользователя и пароля не пусты | |||
// Добавлено условие для проверки, что оба поля имени пользователя и пароля не пусты | |||
guard !username.isEmpty && !password.isEmpty && !password2.isEmpty && (password == password2) else { | |||
if (username.isEmpty) { | |||
Error_label.text = "Ошибка! Пустое имя пользователя(" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давай мб тут алерт нативный эпловый (UIAlertController
) будем показывать, о том что что-то не так
No description provided.