Code Monkey home page Code Monkey logo

hzcalendarvc's Introduction

HZCalendarVC

HZCalendarVC ######两行代码即可简单集成日历控件,提供单日期,往返日期选择,可根据需求随意变换主题颜色 单程.gif

  • 便利构造方法1 传入 参数1: 显示日期的天数 参数2: 显示的起始日期 格式为@"yyyy-MM-dd"(可传nil默认当天)参数3: 默认选择的日期@"yyyy-MM-dd"(可传nil默认当天)

    HZCalendarViewController *vc = [HZCalendarViewController getVcWithDayNumber:365 FromDateforString:nil Selectdate:nil]; vc.calendarblock = ^(HZCalenderDayModel *goDay,HZCalenderDayModel *backDay) { self.label.text = [goDay toString]; };

  • 便利构造方法2直接携带block 传入参数与上边一致

    HZCalendarViewController *vc = [HZCalendarViewController getVcWithDayNumber:365 FromDateforString:nil Selectdate:nil selectBlock:^(HZCalenderDayModel *goDay,HZCalenderDayModel *backDay) { self.label.text = [NSString stringWithFormat:@"%@/%@",[goDay toString],[backDay toString]]; }];

  • 可以显示单个日期的附加图片(Demo中为12306可预订日期30天)只需提供显示的天数

    vc.showImageIndex = 30;

  • 往返日期选择只需isGoBack属性设置为YES

    注意!!!此属性为YES 控制器block中的backDay才有值,否则为nil

    vc.isGoBack = YES;

    往返.gif

  • pch文件中提供COLOR_THEME可以更改主题颜色

    往返.gif

  • hzcalendarvc's People

    Contributors

    houzhenup avatar

    Stargazers

    MohsinAli avatar

    Watchers

    MohsinAli avatar  avatar

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.