Skip to content

thierryH91200/THCalendar

Repository files navigation

BCH compliance

THCalendar

CalendarView framework written in Swift for OS X

Alt text

Usage

Initialize the Calendar View

let calendarView = THCalendarView()

Overriding Preferences

var preferences = THCalendarView.globalPreferences

preferences.calendar.textColor = NSColor.darkGray
preferences.calendar.cellColorDefault = NSColor(white: 0.0, alpha: 0.1)
preferences.calendar.cellColorToday = NSColor.darkGray
preferences.calendar.borderColor = NSColor.red
preferences.calendar.backgroundColors = NSColor.darkGray
preferences.calendar.beginWeek = .monday

preferences.date.circleBackgroundColor = NSColor.yellow
preferences.date.dotColor = #colorLiteral(red: 0, green: 0.9768045545, blue: 0, alpha: 1)

THCalendarView.globalPreferences = preferences

Add Calendar to the view hierarchy

addChildViewController(calendarView)
calendarView.view.frame = containerView.frame
view.addSubview(calendarView.view)

Set the calendar properties

calendarView.counts = generateCounts()
calendarView.selectedDate = Date()

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy