0

我正在使用 Tapku 库在我的视图中添加日历。我遇到了语义问题

calendarMonthView:marksFromDate:toDate:'在协议'TKCalendarMonthViewDataSource'中未实现

在线的

  @implementation ViewController

在我看来controller.m

我尝试在 TKCalendarMonthViewDataSource 下实现 calendarMonthView:marksFromDate:toDate: 但它成功编译然后关闭。

这是我尝试在 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

知道如何解决它,或者我对 calendarMonthView:marksFromDate:toDate 的实现是否错误?

谢谢!

4

1 回答 1

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

于 2015-01-04T19:07:50.590 回答