Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

timoninas
Copy link
Collaborator

No description provided.

@@ -11,6 +11,8 @@ final class AutorizeViewController : UIViewController{

Copy link
Collaborator Author

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)
}
//
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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 = "Ошибка! Пустое имя пользователя(" }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давай мб тут алерт нативный эпловый (UIAlertController) будем показывать, о том что что-то не так

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant