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

leverdeterre/CalendarIOS7: Calendar component for iOS apps

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

开源软件名称:

leverdeterre/CalendarIOS7

开源软件地址:

https://github.com/leverdeterre/CalendarIOS7

开源编程语言:

Objective-C 98.6%

开源软件介绍:

My other works

[http://leverdeterre.github.io] (http://leverdeterre.github.io)

Calendar iOS

Twitter License MIT CocoaPods

Calendar iOS is a very simple calendar/date picker component for your iOS apps based on UICollectionView and 2 layouts.

Day cells styles

Image

Changes


v 0.0.5

  • Support iphone 5, 6, 6Plus layout
  • Fixed Xcode 6
  • Fixed 64bits warnings

v 0.0.3

  • Fixed section number (number of months between two dates)
  • update app localization

v 0.0.2

  • Implementation of horizontal scrollDirection

v 0.0.1

  • Draft version

Supported iOS & SDK Versions

  • Earliest supported deployment target - iOS 6.0

Installation

pod 'CalendarIOS7'

Creating a CalendarViewController

    CALAgendaViewController *agendaVc = [CALAgendaViewController new];
    agendaVc.calendarScrollDirection = UICollectionViewScrollDirectionHorizontal;
    agendaVc.agendaDelegate = self;
    [agendaVc setFromDate:fromDate];
    [agendaVc setToDate:toDate];
    #Select cell style
    agendaVc.dayStyle = CALDayCollectionViewCellDayUIStyleIOS7;

Or subclassing CALAgendaViewController (don't forget your CollectionView outlet CALAgendaCollectionView)

    CALAgendaViewController *agendaVc = [CALAgendaViewController new];
    agendaVc.calendarScrollDirection = UICollectionViewScrollDirectionHorizontal;
    agendaVc.agendaDelegate = self;
    [agendaVc setFromDate:fromDate];
    [agendaVc setToDate:toDate];
    #Select cell style
    agendaVc.dayStyle = CALDayCollectionViewCellDayUIStyleIOS7;

Delegation : CALAgendaCollectionViewDelegate

- (void)agendaCollectionView:(CALAgendaCollectionView *)agendaCollectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath selectedDate:(NSDate *)selectedDate;
- (BOOL)agendaCollectionView:(CALAgendaCollectionView *)agendaCollectionView canSelectDate:(NSDate *)selectedDate;
- (void)agendaCollectionView:(CALAgendaCollectionView *)agendaCollectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath startDate:(NSDate *)startDate endDate:(NSDate*)endDate;

Other protocols : CALgendaEvent

If events are availble, cell can be customize to present this state. The calendar view controller can get a array of events. Events have just to implement this protocol.

@protocol CALgendaEvent <NSObject>

- (NSDate *)eventStartDate;
- (NSDate *)eventEndDate;
- (NSString *)eventName;

@end

TODOS

  • Improve genericity and customization of cells,
  • Hours selection is a draft version .. so i'have to finish it :)



鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
hansemannn/iOS-NFC-Example: 发布时间:2022-06-22
下一篇:
kewlbear/lame-ios-build: script to build lame for iOS发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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