文章来源:淘论文网   发布者: 毕业设计   浏览量: 48



还可以点击去查询以下关键词:
[高度]    [自定义]    [毕业]    [日期]    [选择器]    [高度自定义毕业日期选择器]   

项目介绍:

XMDatePicker

This is a datePicker which you can set as what you want(这个时间选择器你可以自由定义).

1 How to use1.1 You can set datepicker's label colorself.datePicker.selectedLabelColor = [UIColor yellowColor]; self.datePicker.otherLabelColor = [UIColor blueColor];1.2 You can set datePicker's textself.datePicker.selectedTextFont = [UIFont systemFontOfSize:17]; self.datePicker.selectedTextColor = [UIColor blueColor]; self.datePicker.otherTextFont = [UIFont systemFontOfSize:15]; self.datePicker.otherTextColor = [UIColor grayColor];1.3 You can set separator's color and width// color self.datePicker.seperateLineColor = [UIColor redColor]; //width self.datePicker.seperatorWidth = 60;1.4 You can select datePicker separator's type. There are three types by default.  

//Default

self.datePicker.pickerViewType = PickerViewTypeLongSperator;

//Dynamic seperate line

self.datePicker.pickerViewType = PickerViewTypeDynamicSperator;

//Static seperate line

self.datePicker.pickerViewType = PickerViewTypeStaticSperator;1.5 Date show type.There are five types by default.

//yyyy-MM-dd HH:mm

self.datePicker.dateShowType = DateShowingTypeYMDHM;

//yyyy-MM-dd HH

self.datePicker.dateShowType = DateShowingTypeYMDH;

//yyyy-MM-dd

self.datePicker.dateShowType = DateShowingTypeYMD;

//MM-dd HH:mm

self.datePicker.dateShowType = DateShowingTypeMDHM;

//dd HH:mm

self.datePicker.dateShowType = DateShowingTypeDHM;1.6 You are free to set row height and component width of the datePicker self.datePicker.componentWidth = 70; self.datePicker.rowHeight = 30;1.7 You can set date unit self.datePicker.yearUnit = @'年'; self.datePicker.monthUnit = @'月'; self.datePicker.dayUnit = @'日'; self.datePicker.hourUnit = @'时'; self.datePicker.miniteUnit = @'分';picture 1

picture 2

picture 3

2 usage2.1 cocoaPods

pod XMDatePicker

2.2 Manual import1 Drag all files in the XMDatePicker folder to your progect2 improt the main file  #import 'XMDatePicker.h'3 Method excute3.1 Excute - (void)showPickerView

(调用方法- (void)showPickerView展示pickerView)

3.2 Implement protocol method

There are two protocol methods Which are - (void)pickerView:(XMDatePicker *)pickerView didSelectedDateString:(NSString *)dateString and - (void)pickerView:(XMDatePicker *)pickerView didClickOkButtonWithDateString:(NSString *)dateString.

If you need not click the confirmation button transmit date strings, you can implement the first method, otherwise the second.

有两个代理方法,论文开题报告,分别是- (void)pickerView:(XMDatePicker *)pickerView didSelectedDateString:(NSString *)dateString和- (void)pickerView:(XMDatePicker *)pickerView didClickOkButtonWithDateString:(NSString *)dateString,如果你不需要点击“确认”按钮去最终确定所选择的日期,而是滑动转轮的同时更新日期,那么你可以实现第一个代理方法,否则就实现第二个代理方法

 3 Issue

If you find a bug, please tell me.My E-mail address is 1179102890@qq.com. If you have a good idea ,you can discuss with me.

最后,我在《XMDatePicker的写作思路》中简要讲了一下处理分割线的问题,有什么问题希望大家批评指正!

github地址:
https://github.com/DreamOfXM/XMDatePicker


这里还有:


还可以点击去查询:
[高度]    [自定义]    [毕业]    [日期]    [选择器]    [高度自定义毕业日期选择器]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/7527.docx
  • 上一篇:仿网易考拉海购的分毕业设计类菜单栏联动选择界面
  • 下一篇:自定义UISilder实现添加点毕业设计,然后可以点击,并且可以抛出事件