一个为开发人员设计的通用可定制日历组件

EYCalendar

EYCalendar 是为开发者精心打造的通用可自定义日历组件,可为您的应用程序提供丰富强大的功能。

预览

黑暗模式 白色模式

主要特色:

双重日历类型:

此日历同时支持公历和伊斯兰历。 开发者可以通过一个切换开关轻松地在两种日历类型之间切换。

##可自定义主题: 开发者可以灵活地更改日历的主题颜色,以便与他们应用程序的设计完美融合。 包括多种预定义的主题,开发者还可以自定义配色方案。

起始日期和月份配置:

Set the starting date for the calendar to align with your application's requirements.
Choose the number of months to display, providing flexibility in the calendar's duration.

字体自定义:

Users can customize the font used in the calendar, ensuring consistency with the overall application design.
A selection of fonts is available, and developers can also integrate custom fonts.

伊斯兰历标记:

When using the Islamic calendar, a flag is displayed to indicate the calendar type, making it clear for users.
The flag is easily toggleable, allowing users to switch between a standard calendar view and an Islamic calendar view.

独立日历模式:

For simplicity, users can choose to use the calendar in a single mode, either as a standard Gregorian calendar or an Islamic calendar.

RTL支持:

Add a configuration option for RTL support in your calendar component.
Adjust styles and layouts based on the RTL setting.

安装

CocoaPods

将此代码添加到您的 podfile,以获取最新版本

pod 'EYCalendar'

或指定所需版本

pod 'EYCalendar', '~> 1.0.0'

手动安装

下载并包含代码库中的 EYCalendar 文件夹和文件。

要求

  • iOS 13+
  • Swift 5

如何使用

// This is in your application
   class ViewController: UIViewController {
    
    private let calendar:EYCalendar = {
        let configurations = EYCalendarConfigration(startDate: Date() , NoMonths: 24 , themeColor: .blue, font: UIFont.systemFont(ofSize: Calendars