Latest 1.0.6
Homepage https://github.com/holyCoco/TSCalendarDemo
License Custom Copyright (C) 2016 Apple Inc.All Rights Reserved.
Platforms ios 7.0, requires ARC
Authors

TSCalendar

This is a calendar base on UICollectionView!

You can use the calendar base on below code:

TSCalendarView* calendarView = [[TSCalendarView alloc] initWithFrame:CGRectMake(0, 60, kTSC_DeviceWidth, kTSC_DeviceWidth / 7.0 * 6.0)];
calendarView.uDay_titleColor = [UIColor redColor];
calendarView.uDay_subTitleColor = [UIColor orangeColor];
calendarView.uDay_selectedTitleColor = [UIColor whiteColor];
calendarView.uDay_selectedSubTitleColor = [UIColor greenColor];
calendarView.uDay_selectedBackgroundColor = [UIColor orangeColor];
calendarView.uDays_layoutType = TSCalendarDaysLayoutType_Default; 
//-----------------------v1.0.1-------------------------
calendarView.uDay_backgroundColor = [UIColor clearColor];    //可以修改日历可点击dayView为透明
calendarView.isShowUDayBorderLine = YES;                     //可以修分割线的颜色以及是否显示
calendarView.uDay_BorderLineColor = [UIColor redColor];
calendarView.uDays_ModBackColor = [UIColor lightGrayColor];  //可以修改日历不可点击dayView的背景色和字体颜色
calendarView.uDays_ModTitleColor = [UIColor grayColor];
//-------------------------------------------------------
calendarView.delegate = self;
[self.view addSubview:calendarView];

### There are some "delegate" you can complete:
* - (void)calendarHeightAtPresent:(float)calendarH;   //you can get current height for calendar when it scroll.
* - (void)calendarDidSelectItemModel:(TSCalendarUnitDateModel*)model andIndexPath:(NSIndexPath*)indexPath; //you can a day info selected.
* - (void)calendarCurrentMonth:(int)month andYear:(int)year;    //you can get the infomation about year and month when the calendar scroll stop.

版本特性

v1.0.3
  *修改12月显示为0月的bug   
  *添加选中天的样式:可以设置圆形填充选中,圆形边框选中,和矩形填充选中,选中背景色和字体颜色自定
v1.0.4
  *修改在iOS9以下collectionView显示错乱的问题
v1.0.6
  *修改起始年限为计算机元年1970,修改日历长度为1万年!

Latest podspec

{
    "name": "TSCalendarView",
    "version": "1.0.6",
    "summary": "A calendar base on UICollectionView.",
    "homepage": "https://github.com/holyCoco/TSCalendarDemo",
    "authors": {
        "ZhangQiang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/holyCoco/TSCalendarDemo.git",
        "commit": "031fb6a24b9433607eb22fc0132d73a968e6878c",
        "tag": "1.0.6"
    },
    "source_files": "TSCalendarDemo/Classes/TSCalendarView/*.{h,m}",
    "license": {
        "type": "Custom",
        "text": "Copyright (C) 2016 Apple Inc.All Rights Reserved."
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This