Method in protocol not implemented correctly

88 Views Asked by At

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!

1

There are 1 best solutions below

0
MutenFuzz On

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