0

I am using the Tapku library to add the calendar in my view. I am getting semantic issue

calendarMonthView:marksFromDate:toDate:'in protocol 'TKCalendarMonthViewDataSource' not implemented

on line

  @implementation ViewController

in my view controller.m

I tried implementing calendarMonthView:marksFromDate:toDate: under TKCalendarMonthViewDataSource but it successfully compiles then shuts down.

This is my code where I have tried implementing it in TKCalendarMonthView.h

@protocol TKCalendarMonthViewDataSource <NSObject>

- calendarMonthView:marksFromDate:toDate;


/** A data source that will correspond to marks for the calendar month grid for a particular     month.
 @param monthView The calendar month grid.
 @param startDate The first date shown by the calendar month grid.
 @param lastDate The last date shown by the calendar month grid.
 @return Returns an array of NSNumber objects corresponding the number of days specified in the     start and last day parameters. Each NSNumber variable will give a BOOL value that will be used to     display a dot under the day.
 */


- (NSArray*) calendarMonthView:(TKCalendarMonthView*)monthView marksFromDate:(NSDate*)startDate toDate:(NSDate*)lastDate;


@end

Any idea how I can fix it or is my implementation of calendarMonthView:marksFromDate:toDate wrong?

Thanks!

Carlos Alan
  • 27
  • 11
  • You have to actually implement the data source method in your view controller - the class that acts as the data source. – rmaddy Jan 04 '15 at 19:04

1 Answers1

0

Make sure your view controller conforms to the datasource protocol:

viewcontroller.h:

@interface ViewController : UIViewController<TKCalendarMonthViewDataSource>

..and implement the calendarMonthView:marksFromDate:toDate method in your viewcontroller.m

MutenFuzz
  • 135
  • 1
  • 9