klazuka / Kal

A calendar component for the iPhone (the UI is designed to match MobileCal)
http://www.thepolypeptides.com
1.22k stars 345 forks source link

I need to simulate events calendar #76

Open ntgentil opened 11 years ago

ntgentil commented 11 years ago

HI,

Can you please give a sample implementation that how to create the Datasource protocol for kal source code, so that i can include like this

id source = [[MyKalDataSource alloc] init]; KalViewController *calendar = [[[KalViewController alloc] initWithDataSource:source] autorelease]; [self.navigationController pushViewController:calendar animated:YES];

please can you give implementation for MyKalDataSource protocol

Could someone help with this implementation? I need to simulate events.

darkrainbow12 commented 11 years ago

Hi,

You can just follow the example of the "Holiday" which is in the calendar. You create a class named "MyKalDatasource" which inherits from NSObject and which implements the "KalDataSource". You implement the methods inherits from the KalDataSource. You set the DataSource of the Kal with your own.

It's quite simple if you follow the example of Holiday (the SQL sources).