Giter Club home page Giter Club logo

ffcalendar's Introduction

FFCalendar

A study of iOS Yearly, Monthly, Weekly and Daily Calendars.

Yearly Calendar for iOS

Monthly Calendar for iOS

Weekly Calendar for iOS

Daily Calendar for iOS

Limitations

  • For iPad only
  • Works on iOS 7 and above

Usage

Basic usage is implemented in FFCalendarViewController. First you should import FFCalendar.h in FFCalendarViewController. Then, subclass FFYearCalendarView, FFMonthCalendarView, FFWeekCalendarView and FFDayCalendarView. Also set the respective protocols, they will always provide the last modified dictionary (which I called dictEvents), and hence, they will help to update the others calendars.

The dictEvents is formed by events (FFEvent) and their dates. Inside FFEvent you will find:

  • stringCustomerName: the name of the customer
  • dateDay: informs the day, month and year when the event will happen
  • dateTimeBegin: the hour and minute when the event will begin
  • dateTimeEnd: the hour and minute when the event will end
  • arrayWithGuests: an array with all selected guests.

On the other hand, if you enjoyed the FFCalendarViewController's view as it is, you can just add it as a single subview, like following:

- (void)displayFFCalendar {

    FFCalendarViewController *calendarVc = [FFCalendarViewController new];
    [calendarVc setProtocol:self];
    [calendarVc setArrayWithEvents:[self arrayWithEvents]];
    
    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:calendarVc];
    navigationController.view.frame = CGRectMake(0., 0., self.view.frame.size.width, self.view.frame.size.height);

    [self addChildViewController:navigationController];
    [self.view addSubview:navigationController.view];
    [navigationController didMoveToParentViewController:self];
}

- (NSMutableArray *)arrayWithEvents {

    FFEvent *event1 = [FFEvent new];
    [event1 setStringCustomerName: @"Customer A"];
    [event1 setNumCustomerID:@1];
    [event1 setDateDay:[NSDate dateWithYear:[NSDate componentsOfCurrentDate].year month:[NSDate componentsOfCurrentDate].month day:[NSDate componentsOfCurrentDate].day]];
    [event1 setDateTimeBegin:[NSDate dateWithHour:10 min:00]];
    [event1 setDateTimeEnd:[NSDate dateWithHour:15 min:13]];
    [event1 setArrayWithGuests:[NSMutableArray arrayWithArray:@[@[@111, @"Guest 2", @"[email protected]"], @[@111, @"Guest 4", @"[email protected]"], @[@111, @"Guest 5", @"[email protected]"], @[@111, @"Guest 7", @"[email protected]"]]]];
    
    return [NSMutableArray arrayWithArray:@[event1];
}

License

FFCalendar is available under the MIT license.

Contact

Contact me at: http://fernandasportfolio.tumblr.com/contato

ffcalendar's People

Contributors

fggeraissate avatar

Watchers

James Cloos 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.