Latest 1.0.0
Homepage https://github.com/XiaopengWang90/XPCalendar
License MIT
Platforms ios 8.0, requires ARC
Authors

效果图展示

image

使用cocoapod 导入XPCalendar

platform :ios, ‘8.0’

use_frameworks!个别需要用到它,比如reactiveCocoa

target ‘CalendarDemo’ do
pod ‘XPCalendar’
end

调用XPCalendar

导入头文件 #import "XPCalendar.h"

CGFloat width = self.view.bounds.size.width ;
CGPoint origin = CGPointMake(0, 40);
XPCalendarView *calendar = [[XPCalendarView alloc] initWithFrameOrigin:origin width:width];
calendar.didSelectDayHandler= ^(NSInteger year, NSInteger month, NSInteger day) {

};

   calendar.calendarScrollView.selectYear = 2018;   //设置初始的年份
   calendar.calendarScrollView.selectMonth = 04;   //设置初始的月份
   calendar.calendarScrollView.selectDay = 8;       //设置初始的日期
   calendar.calendarScrollView.selectBkgCircleColor = [UIColor colorWithRed:182.0 / 255.0 green:210.0 / 255.0 blue:87.0 / 255.0 alpha:1.0];;     //设置选中的颜色
   [self.view addSubview:calendar];

Latest podspec

{
    "name": "XPCalendar",
    "version": "1.0.0",
    "summary": "u4e00u4e2au7b80u6d01u7684u65e5u5386u9009u62e9",
    "description": "u4e00u4e2au7b80u6d01u7684u65e5u5386u9009u62e9,u53efu4ee5u4feeu6539u9009u62e9u7684u989cu8272",
    "homepage": "https://github.com/XiaopengWang90/XPCalendar",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "wangxiaopeng": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/XiaopengWang90/XPCalendar.git",
        "tag": "v1.0.0"
    },
    "source_files": "XPCalendar/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This