Question

I've attached the Tapku Calendar to my project. It works great. But I have to add events to my calendar from RSS or JSON data. I didn't see any method in Tabku Lib about this issue.

How can I add events to Tapku Calendar?

Was it helpful?

Solution

I've worked with both TapKu and Kal. Honestly, I recommend using Kal over TapKu, because Kal offers callback methods designed to work with loading data from the web. I can't say the same for TapKu.

The TapKu documentation is here, but as you stated, there's no particular way to add data. With TapKu, you basically specify which days to show marks on the calendar, and handle changes to the selected date.

You can find more information about Kal at its Wiki on GitHub.

OTHER TIPS

You can use this delegate method :

-(NSArray *)calendarMonthView:(TKCalendarMonthView *)monthView marksFromDate:(NSDate *)startDate toDate:(NSDate *)lastDate
{
    // adds marks to the individual dates
    // return an array containing boolean values (YES/NO)
    // whether to mark the date[index];
}

I'm currently having no issue adding all my current events into the KAL calendar's data source, and changing the marker is very simple also. Although, it may be simple, some changes has to be done to the KAL.bundle file that you should have imported into your project/framework. It contains all the photos used to create KAL's view.

Anyways, you're going to want to go to KAL's directory and under KalTileView.m and it is there where you will find

} else { 
textColor = ........
shadowColor = .......
markerImage = [UIImage imageNamed:@"Kal.bundle/kal_marker.png"];
}

The above code is in the drawRect method.

Modifying the marker is fine.... but I found some difficulties importing several markers so I could randomly choose from the markers to display.... to make the app a little more colorful :P. But nope, didn't work.

Although, you can change the marker to another color if you'd like.

http://developinginthedark.com/posts/iphone-tapku-calendar-markers

Go to this site to download the demo code, and also have the detail explanation of the method to add markers

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