-
Couldn't load subscription status.
- Fork 0
Sprint 09 #1
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
base: main
Are you sure you want to change the base?
Sprint 09 #1
Conversation
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.
Будет здорово, если и стилистические комментарии учтешь
| override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | ||
| if segue.identifier == ShowSingleImageSegueIdentifier { | ||
| let viewController = segue.destination as! SingleImageViewController | ||
| let indexPath = sender as! IndexPath | ||
| let image = UIImage(named: photosName[indexPath.row]) | ||
| viewController.image = image | ||
| } else { | ||
| super.prepare(for: segue, sender: sender) | ||
| } | ||
| } | ||
| } |
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.
здесь поехало форматирование, давай поправим
| if segue.identifier == ShowSingleImageSegueIdentifier { | ||
| let viewController = segue.destination as! SingleImageViewController | ||
| let indexPath = sender as! IndexPath |
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.
Никогда не используй force unwrap в тестовом проекте или проектах для портфолио.
Проверяющий обращает на них пристальное внимание и может сделать поспешные выводы. Гораздо выигрышнее будет смотреться безопасное извлечение опционалов через if let a = b, и мягкий каст if let c = d as? D
| @IBOutlet private var tableViewImage: UITableView! | ||
|
|
||
| private var photosName = [String]() | ||
| private let ShowSingleImageSegueIdentifier = "ShowSingleImage" |
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. Эта константа не является отдельным типом
| // @IBOutlet weak var exitButton: UIButton! | ||
| // @IBOutlet weak var imageProfile: UIImageView! | ||
| // @IBOutlet weak var name: UILabel! | ||
| // @IBOutlet weak var nickName: UILabel! | ||
| // @IBOutlet weak var status: UILabel! | ||
|
|
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.
душу наверное греет, но лучше все-таки мертвый код удалять-вырезать-выкорчевывать :)
| let image = UIImageView() | ||
| let labelName = UILabel() | ||
| let labelNickname = UILabel() | ||
| let labelStatus = UILabel() | ||
| let button = UIButton.systemButton(with: UIImage(systemName: "ipad.and.arrow.forward")!, target: ProfileViewController.self, action: 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.
пока что не хватает модификаторов доступа
|
|
||
|
|
||
| labelName.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.
максимум одна пустая строка между логическими блоками
|
|
||
| @IBOutlet weak private var buttonBack: UIButton! | ||
| @IBOutlet weak var imageView: UIImageView! | ||
| @IBOutlet weak var scrollView: UIScrollView! |
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.
тоже можно приватными сделать
| scrollView.setContentOffset(CGPoint(x: x, y: y), animated: false) | ||
| } | ||
|
|
||
| @IBAction func clickSharingButton(_ sender: Any) { |
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.
и эту функцию тоже приватной
|
Поправил все замечания в коммите "fix after review" |
| @IBOutlet weak private var imageView: UIImageView! | ||
| @IBOutlet weak private var scrollView: UIScrollView! | ||
|
|
||
| @IBOutlet weak var sharingButton: UIButton! |
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.
private?
|
Можно смерджить |
No description provided.