Digital ACT-191 ONEAPP-7016 story: minor changes
This commit is contained in:
parent
0f70047e5a
commit
ef80db9e73
@ -90,6 +90,7 @@ open class CalendarBase: View {
|
||||
collectionView.dataSource = self
|
||||
collectionView.showsHorizontalScrollIndicator = false
|
||||
collectionView.showsVerticalScrollIndicator = false
|
||||
collectionView.backgroundColor = .clear
|
||||
collectionView.register(CalendarDateCollectionViewCell.self, forCellWithReuseIdentifier: CalendarDateCollectionViewCell.identifier)
|
||||
collectionView.register(CalendarHeaderReusableView.self,
|
||||
forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader,
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
|
||||
/// Custom data type for indicators prop
|
||||
//extension CalendarBase {
|
||||
extension CalendarBase {
|
||||
public struct CalendarIndicatorModel {
|
||||
|
||||
/// Text that shown to an indicator for legend
|
||||
@ -22,4 +22,4 @@ import Foundation
|
||||
self.date = date
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ open class CalendarLegendView: View {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Public Properties
|
||||
//--------------------------------------------------
|
||||
open var items: [CalendarIndicatorModel] = [] { didSet { setNeedsUpdate() } }
|
||||
open var items: [CalendarBase.CalendarIndicatorModel] = [] { didSet { setNeedsUpdate() } }
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Private Properties
|
||||
@ -90,6 +90,8 @@ open class CalendarLegendView: View {
|
||||
open override func updateView() {
|
||||
super.updateView()
|
||||
legendCollectionView.reloadData()
|
||||
setNeedsLayout()
|
||||
layoutIfNeeded()
|
||||
}
|
||||
|
||||
override open func layoutSubviews() {
|
||||
|
||||
@ -47,7 +47,7 @@ class CalendarFooterReusableView: UICollectionReusableView {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
func configure(with indicators: [CalendarIndicatorModel]) {
|
||||
func configure(with indicators: [CalendarBase.CalendarIndicatorModel]) {
|
||||
footerView.items = indicators
|
||||
addSubview(footerView)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user