Skip to content

Conversation

@MaxCode2023
Copy link
Owner

No description provided.

Copy link

@ABashkirova ABashkirova left a comment

Choose a reason for hiding this comment

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

Будет здорово, если и стилистические комментарии учтешь

Comment on lines 30 to 40
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)
}
}
}

Choose a reason for hiding this comment

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

здесь поехало форматирование, давай поправим

Comment on lines 31 to 33
if segue.identifier == ShowSingleImageSegueIdentifier {
let viewController = segue.destination as! SingleImageViewController
let indexPath = sender as! IndexPath

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"

Choose a reason for hiding this comment

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

предлагаю придерживаться распространненого правила по именованию свойств – нижний camelCase. Эта константа не является отдельным типом

Comment on lines 12 to 17
// @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!

Choose a reason for hiding this comment

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

душу наверное греет, но лучше все-таки мертвый код удалять-вырезать-выкорчевывать :)

Comment on lines 18 to 23
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)

Choose a reason for hiding this comment

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

пока что не хватает модификаторов доступа

Comment on lines 48 to 50


labelName.text = "Екатерина Новикова"

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!

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) {

Choose a reason for hiding this comment

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

и эту функцию тоже приватной

@MaxCode2023
Copy link
Owner Author

Поправил все замечания в коммите "fix after review"

@IBOutlet weak private var imageView: UIImageView!
@IBOutlet weak private var scrollView: UIScrollView!

@IBOutlet weak var sharingButton: UIButton!

Choose a reason for hiding this comment

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

private?

@IBDesignable
Copy link

Можно смерджить

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.

3 participants