Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
chore: update constraints on header view (#1805)
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Umer committed Oct 4, 2023
1 parent be6a5cc commit f319b7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Source/CourseDashboardHeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,18 @@ class CourseDashboardHeaderView: UIView {
}

if bannerInfo != nil {
datesBannerView.removeFromSuperview()
containerView.addSubview(datesBannerView)
if !containerView.subviews.contains(datesBannerView) {
containerView.addSubview(datesBannerView)
}

datesBannerView.snp.remakeConstraints { make in
make.top.equalTo(bottomContainer.snp.bottom).offset(StandardVerticalMargin)
make.leading.equalTo(containerView)
make.trailing.equalTo(containerView)
}
bottomContainer = datesBannerView
} else {
datesBannerView.removeFromSuperview()
}

tabbarView.snp.remakeConstraints { make in
Expand Down
2 changes: 1 addition & 1 deletion Source/NewCourseDashboardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class NewCourseDashboardViewController: UIViewController, InterfaceOrientationOv
make.top.equalTo(safeTop)
make.leading.equalTo(contentView)
make.trailing.equalTo(contentView)
make.height.lessThanOrEqualTo(StandardVerticalMargin * 100)
make.height.lessThanOrEqualTo(StandardVerticalMargin * 120)
}

container.snp.remakeConstraints { make in
Expand Down

0 comments on commit f319b7b

Please sign in to comment.