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

New exam lessons screen #351

Merged
merged 29 commits into from
Aug 30, 2018
Merged

New exam lessons screen #351

merged 29 commits into from
Aug 30, 2018

Conversation

ivan-magda
Copy link
Member

Задача: #APPS-2006

Описание:
Обновили внешний вид экрана темы.

ezgif com-gif-maker

@ivan-magda ivan-magda self-assigned this Aug 26, 2018
@ivan-magda ivan-magda added this to the 1.67 milestone Aug 26, 2018
@ivan-magda ivan-magda requested review from kvld and Ostrenkiy August 26, 2018 09:47
@kvld kvld removed the request for review from Ostrenkiy August 27, 2018 22:32
LessonsViewData(
id: $0.id,
title: $0.title,
subtitle: countLocalizedString(
Copy link
Contributor

Choose a reason for hiding this comment

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

Это pluralize? Уже есть хелпер в /StepicAdaptiveCourse/StringHelper.swift, он не подходит?

Copy link
Member Author

Choose a reason for hiding this comment

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

Про такую штуку не знал, попробую.

Stringsdict вроде бы стандарт для таких ситуаций 🤔


import Foundation

final class LessonHeaderTableView: UIView {
Copy link
Contributor

Choose a reason for hiding this comment

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

Кмк, это все таки LessonTableHeaderView :)


override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
triggerHeaderViewLayoutUpdate()
Copy link
Contributor

Choose a reason for hiding this comment

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

Аналогично тому, что уже обсуждали. Давай тогда использовать здесь координатор.

tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = appearance.tableViewEstimatedRowHeight

tableView.tableHeaderView = LessonHeaderTableView.fromNib() as LessonHeaderTableView
Copy link
Contributor

Choose a reason for hiding this comment

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

Можно без указания типов два раза и без optional:

let headerView: LessonHeaderTableView = .fromNib()
headerView.layer.insertSublayer(headerViewGradient, at: 0)
tableView.tableHeaderView = headerView

@ivan-magda
Copy link
Member Author

@kvld ping

Sent with GitHawk

@ivan-magda ivan-magda merged commit e1c3742 into dev Aug 30, 2018
@ivan-magda ivan-magda deleted the feature/exam-new-lessons-screen branch August 30, 2018 09:38
@kvld kvld mentioned this pull request Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants