61 lines
1.5 KiB
Swift
61 lines
1.5 KiB
Swift
//
|
|
// CalendarReusableView.swift
|
|
// VDS
|
|
//
|
|
// Created by Kanamarlapudi, Vasavi on 24/04/24.
|
|
//
|
|
|
|
import UIKit
|
|
import VDSTokens
|
|
|
|
/// Custom header view
|
|
class CalendarHeaderReusableView: UICollectionReusableView {
|
|
|
|
///Identifier for the Calendar Header Reusable View
|
|
static let identifier: String = String(describing: CalendarHeaderReusableView.self)
|
|
|
|
private lazy var headerView = CalendarHeaderView()
|
|
|
|
override init(frame: CGRect) {
|
|
super.init(frame: frame)
|
|
}
|
|
|
|
required init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
|
|
func configure(with color: Bool) {
|
|
addSubview(headerView)
|
|
}
|
|
|
|
override func layoutSubviews() {
|
|
super.layoutSubviews()
|
|
}
|
|
}
|
|
|
|
/// Custom footer view
|
|
class CalendarFooterReusableView: UICollectionReusableView {
|
|
|
|
///Identifier for the Calendar Footer Reusable View
|
|
static let identifier: String = String(describing: CalendarFooterReusableView.self)
|
|
|
|
private lazy var footerView = CalendarLegendView()
|
|
|
|
override init(frame: CGRect) {
|
|
super.init(frame: frame)
|
|
}
|
|
|
|
required init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
|
|
func configure(with indicators: [CalendarBase.CalendarIndicatorModel]) {
|
|
footerView.items = indicators
|
|
addSubview(footerView)
|
|
}
|
|
|
|
override func layoutSubviews() {
|
|
super.layoutSubviews()
|
|
}
|
|
}
|