0

Tapku ライブラリを使用して、ビューにカレンダーを追加しています。セマンティックの問題が発生しています

calendarMonthView:marksFromDate:toDate:' プロトコル 'TKCalendarMonthViewDataSource' で実装されていません

オンライン

  @implementation ViewController

私のビューController.mで

calendarMonthView:marksFromDate:toDate: を TKCalendarMonthViewDataSource の下に実装しようとしましたが、コンパイルに成功してからシャットダウンします。

これは、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 に答える