Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disappearing search bar fixed -Sorted instructors/class names in filter screen -Made the selected day in the class list screen bold -Resolved a spacing issue on the home screen -Detail view back/favorite buttons adjust color based on background color -Header images in the detail views expand when the scrollview is pulled down -Added ‘view all’ button to today’s classes header in the home screen
- Loading branch information
Showing
9 changed files
with
157 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// | ||
// TodaysClassesHeaderView.swift | ||
// Fitness | ||
// | ||
// Created by Joseph Fulgieri on 10/26/18. | ||
// Copyright © 2018 Uplift. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
protocol NavigationDelegate { | ||
func changeTab(index: Int) | ||
} | ||
|
||
class TodaysClassesHeaderView: UICollectionReusableView { | ||
|
||
// MARK: - INITIALIZATION | ||
static let identifier = Identifiers.todaysClassesHeaderView | ||
var titleLabel: UILabel! | ||
var viewAllButton: UIButton! | ||
var delegate: NavigationDelegate? | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
backgroundColor = UIColor.clear | ||
|
||
titleLabel = UILabel() | ||
titleLabel.font = ._14MontserratBold | ||
titleLabel.textColor = .fitnessDarkGrey | ||
titleLabel.text = "TODAY'S CLASSES" | ||
addSubview(titleLabel) | ||
|
||
viewAllButton = UIButton() | ||
viewAllButton.setTitle("view all", for: .normal) | ||
viewAllButton.setTitleColor(.fitnessDarkGrey, for: .normal) | ||
viewAllButton.titleLabel?.font = ._12LatoBlack | ||
viewAllButton.addTarget(self, action: #selector(viewAll), for: .touchUpInside) | ||
addSubview(viewAllButton) | ||
|
||
// MARK: - CONSTRAINTS | ||
titleLabel.snp.updateConstraints {make in | ||
make.leading.equalTo(16) | ||
make.top.equalToSuperview() | ||
make.height.equalTo(titleLabel.intrinsicContentSize.height) | ||
} | ||
|
||
viewAllButton.snp.updateConstraints { make in | ||
make.trailing.equalToSuperview().offset(-15) | ||
make.bottom.equalTo(titleLabel) | ||
make.height.equalTo(titleLabel) | ||
} | ||
} | ||
|
||
required init?(coder aDecoder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
@objc func viewAll() { | ||
guard let navigationDelegate = delegate else { return } | ||
navigationDelegate.changeTab(index: 1) | ||
} | ||
} | ||
|