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

Ветка 17-го спринта #4

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Ветка 17-го спринта #4

wants to merge 13 commits into from

Conversation

Dzhabaev
Copy link
Owner

@Dzhabaev Dzhabaev commented Apr 5, 2024

No description provided.

…ыбранный день, кнопка фильтрации будет скрыта. При переключении в календаре дней действие фильра не отменяется. Настроен визуальный сигнал отображающий то, что фильтр активен.
@@ -0,0 +1,115 @@
/*

Choose a reason for hiding this comment

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

Еще дополнительные языки, круто !

innerRect.addSubview(statsLabel)
innerRect.addSubview(statsNameLabel)

innerRect.translatesAutoresizingMaskIntoConstraints = false

Choose a reason for hiding this comment

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

Обрати внимание на инструмент forEach при верстке и настройке элементов, он поможет тебе сократить повторяющийся код
Вот пример:

        [view1, 
         view2,
         view3].forEach {
            $0.translatesAutoresizingMaskIntoConstraints = false
             view.addSubview($0)
        }

Таким образом все строки translatesAutoresizingMaskIntoConstraints и addSubview выше можно удалить и очень сильно сократить код

])
}

private func showPlaceholder() {

Choose a reason for hiding this comment

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

Этот метод и следующий очень схожи, может объединим ?

    private func changeStatePlaceholder(isHidden: Bool) {
        emptyStateImageView.isHidden = !isHidden
        emptyStateLabel.isHidden = !isHidden
        bestPeriodLabel.isHidden = isHidden
        perfectDaysLabel.isHidden = isHidden
        completedTrackersLabel.isHidden = isHidden
        averageLabel.isHidden = isHidden
    }

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.

2 participants