CalendarView
class CalendarView : UIView, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout
Calendar View
-
Collection view
Declaration
Swift
private let collectionView: UICollectionView -
Overlay
Declaration
Swift
private let overlay: MonthOverlayView -
Did load view
Declaration
Swift
private var didLoad: Bool -
Has scrolled to today
Declaration
Swift
private var hasScrolledToToday: Bool -
Delegate
Declaration
Swift
weak var delegate: CalendarViewDelegate? -
Total width of view, set this before adding to superview
Declaration
Swift
var totalWidth: CGFloat -
Event service
Declaration
Swift
private let eventService: EventService -
Weather forecast, set this to show weather forecasts
Declaration
Swift
var weatherForecast: WeatherForecastResponse? { get set } -
Dates to display
Declaration
Swift
var dates: CalendarDates { get set } -
Selected date
Declaration
Swift
var selectedDate: Date? { get set } -
Item size
Declaration
Swift
var itemSize: CGSize { get } -
Given total width, calculate item size
- param totalWidth: Total width
Declaration
Swift
static func itemSizeForWidth(_ totalWidth: CGFloat) -> CGSizeReturn Value
item size
-
Preferred collapsed height
Declaration
Swift
var preferredCollapsedHeight: Float { get } -
Preferred expanded height
Declaration
Swift
var preferredExpandedHeight: Float { get } -
Start overlay observers
Declaration
Swift
private func startOverlayObservers() -
Undocumented
Declaration
Swift
override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) -
End overlay observers
Declaration
Swift
private func endOverlayObservers() -
Undocumented
Declaration
Swift
override func didMoveToSuperview() -
Undocumented
Declaration
Swift
private func loadView() -
Scroll to today if needed
Declaration
Swift
private func scrollToTodayIfNeeded() -
Scroll to selected date
Declaration
Swift
func scrollToSelectedDate() -
Reload data
Declaration
Swift
private func reloadData() -
Undocumented
Declaration
Swift
override func layoutSubviews() -
Update selected date
Declaration
Swift
private func updateSelectedDate() -
Redraw visible cells
Declaration
Swift
private func redrawVisibileCells()
-
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell -
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) -
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int -
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) -
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
-
Undocumented
Declaration
Swift
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) -
Undocumented
Declaration
Swift
func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) -
Undocumented
Declaration
Swift
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView)
-
Undocumented
Declaration
Swift
func showOverlay() -
Undocumented
Declaration
Swift
func hideOverlay() -
Update calendar cell
- param calendarCell: Calendar Cell
- param indexPath: Index path
Declaration
Swift
private func update(calendarCell: CalendarCollectionViewCell, indexPath: IndexPath) -
Update weather
Declaration
Swift
private func updateWeather()
CalendarView Class Reference