Git Product home page Git Product logo

melipadcalendar's Introduction

MELiPadCalendar

Calendar for the iPad with table views to display and return scheduling data.

TSNavigationStripView examples

Requirements

  • Xcode 4.5 or higher
  • Apple LLVM compiler
  • EventKit.framework
  • QuartzCore.framework

Demo

Build and run the iPadCalendar project in Xcode. I've included a JSON file for adding todo times, start times, end times, and event labels.

Installation

Drop the MELiPadCalendarView folder into your project. Make sure 'Copy items if needed' and 'Create groups' is checked.

Make sure QuartzCore.framework and EventKit.framework are linked to your project.

Use

The demo provides a datasource by initiating four arrays, one for the dates which will contain data, another for the task start times, another for the task end times, and one for the task labels.

Initiate the calendar with its x Offset, y Offset and side dimension. To stay in tune with Apple's Human Interface Guidelines, I keep the view a perfect square and prevent it from being less than 512 or greater than 768. That will fit two calendars in landscape.

MELiPadCalendarView *calendar = [[MELiPadCalendarView alloc]initWithXoffset:0 andYoffset:0 withDimension:768];
calendar.delegate = self;
self.orientationDate = [NSDate date];
NSString *stringFromDate = [self.dateFormatter stringFromDate:self.orientationDate];
calendar.selectedDate = [self.dateFormatter dateFromString:stringFromDate];
[calendar setUpTheTodoDates:self.theTodoDates withStartTimes:self.theStartHours andEndTimes:self.theEndHours andHeaders:self.theHeaders];
[self.view addSubview:calendar];

Have your view controller conform to the MELiPadCalendarDelegate so that you can change months and receive data when a row in the day is tapped.

if a user taps on any date, the delegate gets the date chosen, if they tap on a task, the delegate also gets the hour range for that task:

- (void)calendar:(MELiPadCalendarView *)calendar didTapTaskWithHours:(NSString *)hours forDate:(NSDate *)date;

For transitioning months, you can either prepare the calendar in the delegate like I do in the demo project, or you can fork this control and prepare it in the view itself.

- (void)calendar:(MELiPadCalendarView *)calendar didTapTransitionMonth:(BOOL)forward;

##Customizing

  • Fonts, text colors, and background colors for most elements can be customized.

Contact

License

MELiPadCalendar is available under the MIT license.

Copyright © 2015 Mike Leveton

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

melipadcalendar's People

Contributors

leveton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

melipadcalendar's Issues

Date selection goofyness

Thanks for the code-

I've got it implemented in an iPad app. I've noticed that when I tap a date, it turns the date a different shade of blue. If I select a second date, the first one remains the same shade of blue. I assume this is by design to allow multiple date selection? Is there a way to make it only select a single date (or to de-select prior dates)?

Display Event Data

Does this calendar allow me to display for instance the title of an event for a specific date, using a datasource method?

Thanks.

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.