All Projects → shevakuilin → Skcalendarview

shevakuilin / Skcalendarview

Licence: mit
SKCalendarView是一个高可控性的日历基础组件,为了提高应用的自由度,默认只提供了日历部分的视图封装,但不涵盖切换月份按钮、年月分显示等非关键性控件,但请不要担心,SKCalendarView为你提供了多样性的API,你可以很轻松的拿到这些信息去展示在你自己的自定义控件中。不仅如此,SKCalendarView还为你封装了公历、农历、节假日以及中国24节气的核心算法,即使你觉得默认的视图并不合胃口,也可以直接快速的利用这套算法创造出一个全新的日历控件。最后,SKCalendarView还提供了一些简单的切换动画,如果你不喜欢它,可以忽略掉,用自己的,这里完全不会受到任何限制。

Projects that are alternatives of or similar to Skcalendarview

UltraWeekCalendar
UltraWeekCalendar - Clean UI to select day through weeks
Stars: ✭ 29 (-76.03%)
Mutual labels:  calendar, ios-ui
Calendarkit
📅 Calendar for Apple platforms in Swift
Stars: ✭ 2,049 (+1593.39%)
Mutual labels:  ios-ui, calendar
Calendarheatmap
A calendar based heatmap which presenting a time series of data points in colors.
Stars: ✭ 113 (-6.61%)
Mutual labels:  calendar
Cosmocalendar
📅 CosmoCalendar is a fully customizable calendar with a wide variety of features and displaying modes.
Stars: ✭ 1,547 (+1178.51%)
Mutual labels:  calendar
Skeletonview
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
Stars: ✭ 10,804 (+8828.93%)
Mutual labels:  ios-ui
Calendarhtml Javascript
Simple Calendar built with Pure JavaScript (No Libraries) http://iamnitinpatel.com/projects/calendar/
Stars: ✭ 113 (-6.61%)
Mutual labels:  calendar
100 Words Design Patterns Java
GoF Design Patterns, each pattern described with story from real life.
Stars: ✭ 117 (-3.31%)
Mutual labels:  prototype
Nativescript Ui Feedback
This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Stars: ✭ 110 (-9.09%)
Mutual labels:  calendar
Rcalendarpicker
RCalendarPicker A date picker control, Calendar calendar control, select control, calendar, date selection, the clock selection control. 日历控件 ,日历选择控件,日历,日期选择,时钟选择控件
Stars: ✭ 121 (+0%)
Mutual labels:  calendar
Calendar
微信小程序日历 酒店日历选择 带公历节日
Stars: ✭ 116 (-4.13%)
Mutual labels:  calendar
Calendar
📆 calendar 日历
Stars: ✭ 119 (-1.65%)
Mutual labels:  calendar
Compactcalendarview
An android library which provides a compact calendar view much like the one used in google calenders.
Stars: ✭ 1,504 (+1142.98%)
Mutual labels:  calendar
Csdwheels
一套基于原生JavaScript开发的插件,无依赖、体积小
Stars: ✭ 114 (-5.79%)
Mutual labels:  calendar
Chrono
Date and time library for Rust
Stars: ✭ 1,780 (+1371.07%)
Mutual labels:  calendar
Hwpopcontroller
pop up your ViewController with custom size, position and animations
Stars: ✭ 113 (-6.61%)
Mutual labels:  ios-ui
Yii2fullcalendar
JQuery Fullcalendar Yii2 Extension
Stars: ✭ 120 (-0.83%)
Mutual labels:  calendar
Calendar
📅 PHP Date & Time library that solves common problems in object oriented, immutable way.
Stars: ✭ 113 (-6.61%)
Mutual labels:  calendar
Privacy services manager
A single management utility to administer Location Services, Contacts requests, Accessibility, and iCloud access in Apple's OS X.
Stars: ✭ 115 (-4.96%)
Mutual labels:  calendar
React Numpad
A numpad for number, date and time, built with and for React.
Stars: ✭ 117 (-3.31%)
Mutual labels:  calendar
Gsimplecal
Simple and lightweight GTK calendar (BSD license)
Stars: ✭ 121 (+0%)
Mutual labels:  calendar

简述

SKCalendarView是一个高可控性的日历基础组件,为了提高应用的自由度,默认只提供了日历部分的视图封装,但不涵盖切换月份按钮、年月分显示等非关键性控件,但请不要担心,SKCalendarView为你提供了多样性的API,你可以很轻松的拿到这些信息去展示在你自己的自定义控件中。不仅如此,SKCalendarView还为你封装了公历、农历、节假日以及中国24节气的核心算法,即使你觉得默认的视图并不合胃口,也可以直接快速的利用这套算法创造出一个全新的日历控件。最后,SKCalendarView还提供了一些简单的切换动画,如果你不喜欢它,可以忽略掉,用自己的,这里完全不会受到任何限制。如果觉得还不错,点个star吧~

效果图

如何开始

1.从GitHub上Clone-->SKCalendarView, 然后查看Demo (由于使用cocoaPods管理,请打开xcworkspace工程进行查看)

2.在项目中使用SKCalendarView,直接将目录下的SKCalendarView文件夹拷贝到工程中,或在podfile文件中添加pod 'SKCalendarView'

3.SKCalendarView的默认视图基于Masonry布局,如果需要使用, 请确保你的工程里已存在Masonry,下载地址

4.如果遇到其它问题,欢迎提交issues,我会及时回复

使用方法

头文件导入

#import "SKConstant.h"

继承SKCalendarView

@property (nonatomic, strong) SKCalendarView * calendarView;

日历设置

_calendarView.calendarTodayTitleColor = [UIColor redColor];// 今天标题字体颜色
_calendarView.calendarTodayTitle = @"今日";// 今天下标题
_calendarView.dateColor = [UIColor orangeColor];// 今天日期数字背景颜色
_calendarView.calendarTodayColor = [UIColor whiteColor];// 今天日期字体颜色
_calendarView.dayoffInWeekColor = [UIColor redColor];
_calendarView.springColor = [UIColor colorWithRed:48 / 255.0 green:200 / 255.0 blue:104 / 255.0 alpha:1];// 春季节气颜色
_calendarView.summerColor = [UIColor colorWithRed:18 / 255.0 green:96 / 255.0 blue:0 alpha:8];// 夏季节气颜色
_calendarView.autumnColor = [UIColor colorWithRed:232 / 255.0 green:195 / 255.0 blue:0 / 255.0 alpha:1];// 秋季节气颜色
_calendarView.winterColor = [UIColor colorWithRed:77 / 255.0 green:161 / 255.0 blue:255 / 255.0 alpha:1];// 冬季节气颜色
_calendarView.holidayColor = [UIColor redColor];//节日字体颜色
self.lastMonth = _calendarView.lastMonth;// 获取上个月的月份
self.nextMonth = _calendarView.nextMonth;// 获取下个月的月份

翻页动画

[SKCalendarAnimationManage animationWithView:self.calendarView andEffect:SK_ANIMATION_REVEAL isNext:YES];

获取农历年

self.chineseYearLabel.text = [NSString stringWithFormat:@"%@年", self.calendarView.chineseYear];// 农历年

获取农历月日

self.chineseMonthAndDayLabel.text = [NSString stringWithFormat:@"%@%@", self.calendarView.chineseMonth, getNoneNil(self.calendarView.chineseCalendarDay[row])];

获取公历年/月

self.yearLabel.text = [NSString stringWithFormat:@"%@年%@月", @(self.calendarView.year), @(self.calendarView.month)];// 公历年

获取节日/节气

self.holidayLabel.text = [self.calendarView getHolidayAndSolarTermsWithChineseDay:getNoneNil(self.calendarView.chineseCalendarDay[row])];

查询指定日期

[self.calendarView checkCalendarWithAppointDate:[NSDate date]];

日历UI配置

@property (nonatomic, strong) UIColor * weekBackgroundColor;// 周的背景颜色
@property (nonatomic, strong) UIColor * normalInWeekColor;// 周(除双休日外)字体颜色
@property (nonatomic, strong) UIColor * dayoffInWeekColor;// 双休日字体颜色
@property (nonatomic, strong) UIColor * calendarTodayColor;// 本日日期字体颜色
@property (nonatomic, strong) UIColor * dateColor;// 日期小背景颜色
@property (nonatomic, strong) UIImage * dateIcon;// 日期图片
@property (nonatomic, strong) UIColor * holidayBackgroundColor;// 节日背景颜色
@property (nonatomic, strong) UIColor * solarTeromBackgroundColor;// 节气背景颜色
@property (nonatomic, strong) UIColor * dateBackgroundColor;// 日期背景颜色(非节日&节气)
@property (nonatomic, strong) UIImage * dateBackgroundIcon;// 日期背景图片
@property (nonatomic, copy) NSString * calendarTodayTitle;// 本日日期标题
@property (nonatomic, strong) UIColor * calendarTodayTitleColor;// 本日日期标题字体颜色
@property (nonatomic, strong) UIColor * calendarTitleColor;// 日期标题字体颜色
@property (nonatomic, strong) UIColor * holidayColor;// 节日标题字体颜色
@property (nonatomic, strong) UIColor * springColor;// 春季节气颜色
@property (nonatomic, strong) UIColor * summerColor;// 夏季节气颜色
@property (nonatomic, strong) UIColor * autumnColor;// 秋季节气颜色
@property (nonatomic, strong) UIColor * winterColor;// 冬季节气颜色
@property (nonatomic, assign) BOOL enableClickEffect;// 开启点击效果
@property (nonatomic, assign) BOOL enableDateRoundCorner;// 开启日期圆角

获取点击的日期

- (void)selectDateWithRow:(NSUInteger)row

感谢你花时间阅读以上内容, 如果这个项目能够帮助到你,记得告诉我

Email: [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].