• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

RCalendarPicker: RCalendarPicker 日历控件 ,日历选择控件,日历,日期选择 ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

RCalendarPicker

开源软件地址:

https://gitee.com/roycms/RCalendarPicker

开源软件介绍:

logo

RCalendarPicker

RCalendarPicker Calendar calendar control, select control, calendar, date selection, the clock selection control. 日历控件 ,日历选择控件,日历,日期选择,时钟选择控件

CocoaPodsPackagistemaildoc

Preview

预览1预览1

cocoapods

pod 'RCalendarPicker'

Run

cd myfindergit clone https://github.com/roycms/RCalendarPicker.gitcd RCalendarPickerrun pod install xcode open RCalendarPicker.xcworkspace

Use Introduce file

Introduce the head file

#import "RCalendarPickerView.h" // The calendar #import "RClockPickerView.h" // A clock dial effect#import "DateHelper.h" // Time processing with the help of the class

calendar

default: MainScreenWidth = 360 MainScreenHeight = 960

 RCalendarPickerView *calendarPicker = [[RCalendarPickerView alloc]initWithFrame:CGRectMake(0, 0, MainScreenWidth, MainScreenHeight)];            calendarPicker.selectDate = [NSDate date]; //默认被选中时间            calendarPicker.complete = ^(NSInteger day, NSInteger month, NSInteger year, NSDate *date){                NSLog(@"%d-%d-%d", (int)year,(int)month,(int)day);            };            [self.view addSubview:calendarPicker];

The lunar calendar

Calendar lunar display forms

RCalendarPickerView *calendarPicker = [[RCalendarPickerView alloc]init];calendarPicker.isLunarCalendar = YES; //开启农历

The calendar dataSource

The days in the calendar display when binding event data

dataSource预览

RCalendarPickerView *calendarPicker = [[RCalendarPickerView alloc]init];calendarPicker.dataSource = self.dataSource;

self.dataSource is test data  for json file

[{"date":"2016-12-1","value":1},{"date":"2016-12-3","value":1},{"date":"2016-12-7","value":1},{"date":"2016-12-19","value":1},{"date":"2016-12-29","value":1}]

calendar Theme

Set the calendar theme colors

RCalendarPickerView *calendarPicker = [[RCalendarPickerView alloc]init];calendarPicker.thisTheme =[UIColor blackColor]; //设置主题颜色 缺省情况下随机显示

A clock dial effect

The effect of a similar watches and clocks, can drag pointer to set a time

 RClockPickerView *rClockPickerView = [[RClockPickerView alloc]initWithFrame:CGRectMake(0, 0, MainScreenWidth, MainScreenHeight)                                                                            clockRadius:140                                                                 clockCalibrationRadius:130];            rClockPickerView.date = [NSDate date];            rClockPickerView.complete = ^(NSInteger hours, NSInteger minutes, NSInteger noon,float clockDate){                NSLog(@"%d-%d-%d   float clockDate:  -%f", (int)hours,(int)minutes,(int)noon,clockDate);                            };            [self.view addSubview:rClockPickerView];

calendar + clock use

To choose the calendar (date) (month) (year) and the vehicle to choose the combination use of the clock

RCalendarPickerView *calendarPicker = [[RCalendarPickerView alloc]initWithFrame:CGRectMake(0, 0, MainScreenWidth, MainScreenHeight)];            calendarPicker.selectDate = [NSDate date]; //默认被选中时间            [self.view addSubview:calendarPicker];                        calendarPicker.complete = ^(NSInteger day, NSInteger month, NSInteger year, NSDate *date){                NSLog(@"%d-%d-%d", (int)year,(int)month,(int)day);                                RClockPickerView *rClockPickerView = [[RClockPickerView alloc]initWithFrame:CGRectMake(0, 0, MainScreenWidth, MainScreenHeight)                                                                                clockRadius:140                                                                     clockCalibrationRadius:130];                rClockPickerView.date = [NSDate date];                rClockPickerView.complete = ^(NSInteger hours, NSInteger minutes, NSInteger noon,float clockDate){                    NSLog(@"%d-%d-%d", (int)hours,(int)minutes,(int)noon);                                        NSDate *selectDate = [DateHelper dateInDate:date Hours:hours>12?hours%12:hours minutes:minutes];                                        NSLog(@"selectDate: %@",selectDate);                                    };                [self.view addSubview:rClockPickerView];            };

pop-up window Gestures conflict bug

In the current UIView sliding gesture of conflicts between the pop-up window will open bugs can be directly in the new UIViewController

            UIViewController *viewController = [[UIViewController alloc]init];                        RCalendarPickerView *calendarPicker = [[RCalendarPickerView alloc]initWithFrame:CGRectMake(0, 0, MainScreenWidth, MainScreenHeight)];            calendarPicker.selectDate = [NSDate date]; //默认被选中时间            [viewController.view addSubview:calendarPicker];            calendarPicker.complete = ^(NSInteger day, NSInteger month, NSInteger year, NSDate *date){                NSLog(@"%d-%d-%d", (int)year,(int)month,(int)day);                  [self.navigationController popViewControllerAnimated:YES];            };            [self.navigationController pushViewController:viewController animated:YES];

TODO

  • 增加选择年月的切换形式
  • Tests

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap