Question

I need to implement a calendar for my app, after searching on different libraries I decided that tapku was the way to go.

I'm kindda new to IOS, so this might be a newbie question:

I succesfully implemented the tapku library, and everything seems to work, except that I dont know how to use it.

When the user selects a date, I want the calender to give me the selected date and switch to a new viewcontroller.

How do I make this happen :)?

btw. I tried to get the documentation, but the downloadlink on github doesn't work.

Was it helpful?

Solution

You need to implement the - (void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)d method of TKCalendarMonthViewDelegate.

#pragma mark -
#pragma mark TKCalendarMonthViewDelegate method

- (void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)date
{
    NSLog(@"DidSelectDate %@",date);
}

Please download & check the sample application from this link

OTHER TIPS

You need to implement the TKCalendarMonthViewDelegate protocol, set your object as the delegate of your TKCalendarMonthView and whenever the user selects a date you'll receive a calendarMonthView:didSelectDate: call.

If you have a look in TKCalendarMonthView.h you'll see all the protocol methods.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top