Skip to content

oxLeslie/AMACalendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMACalendar
This is a Chinese Calendar.
The project AMACalendar is for Bmemo to write and it refer to the Daysquare. So, the need of Bmemo, the support of the lunar calendar.

============ CocoaPods Swift Package Manager License Platform

Requirements

  • Xcode 8+
  • swift 3.0+
  • iOS 9.0+

Usage

let calendar = calendarView(frame: CGRect(x: 10,
                                          y: 50, 
                                      width: UIScreen.main.bounds.width - 20, 
                                     height: 280))
                                     
calendar.addTarget(self, action: #selector(calendarChange), for: .valueChanged)
view.addSubview(calendar)
@objc fileprivate func calendarChange(view: calendarView) {
    let formatter = DateFormatter()
    formatter.dateFormat = "YYYY-MM-dd"
    print(formatter.string(from: view.selectedDate!.0, view.selectedDate!.1)
}

Installation

  • Cocoapods
pod 'AMACalendar', ~> 0.0.2