Update README
Heatmap style calendar made in SwiftUI.
File -> Swift Packages -> Add Package Dependency
https://github.com/s-n-1-0/MMHeatmap.git
Displays a calendar from “start” to “end”.
//"import MMHeatmap" is required let start = Calendar(identifier: .gregorian).date(from: DateComponents(year:2021,month: 12,day: 20))! let end = Calendar(identifier: .gregorian).date(from: DateComponents(year:2022,month: 4,day: 3))! // or nil = now MMHeatmapView(start: start,end:end, data: [MMHeatmapData(year: 2022, month: 4, day:1, value: 10)], style: MMHeatmapStyle(baseCellColor: UIColor.systemIndigo,isScroll: true))
*The variable “style:” is optional.
Calendar cell data.Please not duplicate dates in MMHeatmapViewData.
public init(date _date:Date,value:Int)
public init(year:Int,month:Int,day:Int,value:Int)
Specifies the color strength of the cell.Specify a value greater than or equal to 0.*If you want to set Color.clear, use “nil”.
Please PR or Issues if you have any questions.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
MMHeatmap
Heatmap style calendar made in SwiftUI.
Installation
File -> Swift Packages -> Add Package Dependency
https://github.com/s-n-1-0/MMHeatmap.git
MMHeatmapView
Displays a calendar from “start” to “end”.
*The variable “style:” is optional.
MMHeatmapViewData
Calendar cell data.
Please not duplicate dates in MMHeatmapViewData.
(year,month,day) or date
value:
Specifies the color strength of the cell.
Specify a value greater than or equal to 0.
*If you want to set Color.clear, use “nil”.
MMHeatmapStyle
Example: 4
“M” = 4
“MM” = 04
“MMM” = en: Apr , ja: 4月
false : if you want to display cells until the end of the month in the last month.
*Disabled for iOS13
PR / Issues
Please PR or Issues if you have any questions.