Skip to content

Instantly share code, notes, and snippets.

View aliHafizji's full-sized avatar

Kauserali aliHafizji

View GitHub Profile
Pod::Spec.new do |s|
s.name = "Kal"
s.version = "1.0rc1"
s.summary = "A calendar component for the iPhone (the UI is designed to match MobileCal)."
s.description = <<-DESC
This project aims to provide an open-source implementation of the month view in Apple's mobile calendar app (MobileCal). When the user taps a day on the calendar, any associated data for that day will be displayed in a table view directly below the calendar. As a client of the Kal component, you have 2 responsibilities:
Tell Kal which days need to be marked with a dot because they have associated data.
Provide UITableViewCells which display the details (if any) for the currently selected day.
In order to use Kal in your application, you will need to provide an implementation of the KalDataSource protocol to satisfy these responsibilities. Please see KalDataSource.h and the included demo app for more details.
Pod::Spec.new do |s|
s.name = "Kal"
s.version = "1.0rc1"
s.summary = "A calendar component for the iPhone (the UI is designed to match MobileCal)."
s.description = <<-DESC
This project aims to provide an open-source implementation of the month view in Apple's mobile calendar app (MobileCal). When the user taps a day on the calendar, any associated data for that day will be displayed in a table view directly below the calendar. As a client of the Kal component, you have 2 responsibilities:
Tell Kal which days need to be marked with a dot because they have associated data.
Provide UITableViewCells which display the details (if any) for the currently selected day.
In order to use Kal in your application, you will need to provide an implementation of the KalDataSource protocol to satisfy these responsibilities. Please see KalDataSource.h and the included demo app for more details.
RKObjectManager *objectManager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:BASE_URL]];
objectManager.acceptMIMEType = RKMIMETypeJSON;
RKObjectMapping *sessionMapping = [RKObjectMapping mappingForClass:[Session class]];
[sessionMapping mapKeyPath:@"SessionKey" toAttribute:@"sessionKey"];
[sessionMapping mapKeyPath:@"WindowTime" toAttribute:@"windowTime"];
[sessionMapping mapKeyPath:@"IsNonSliding" toAttribute:@"isNonSliding"];
[objectManager.mappingProvider setMapping:sessionMapping forKeyPath:@"Session"];
[RKObjectManager setSharedManager:objectManager];