Skip to content

Added a method to customise the marker colours via the data source delegate and to detect long press in the calendar - #192

Open
superprat wants to merge 3 commits into
devinross:masterfrom
superprat:master
Open

Added a method to customise the marker colours via the data source delegate and to detect long press in the calendar#192
superprat wants to merge 3 commits into
devinross:masterfrom
superprat:master

Conversation

@superprat

Copy link
Copy Markdown

Method is - (NSArray ) calendarMonthView:(TKCalendarMonthView)monthView colorsForMarksFromDate:(NSDate )startDate toDate:(NSDate)lastDate

-(void)calendarMonthView:(TKCalendarMonthView *)monthView didLongPressDate:(NSDate *)date;

@fvermeulen

Copy link
Copy Markdown

You have to put this codeline in src/TapkuLibrary/TKCalendarMonthView.h otherwise it doesn't know the instance method for the selector

TKCalendarMonthView.h

  • (NSArray_) calendarMonthView:(TKCalendarMonthView_)monthView colorsForMarksFromDate:(NSDate_)startDate toDate:(NSDate_)lastDate;

@fvermeulen

Copy link
Copy Markdown

Can you add an Example how to use this? I get errors.

@superprat

Copy link
Copy Markdown
Author

Right you are, I forgot to commit that file

On 10-Oct-2012, at 6:23 PM, Fokke Vermeulen notifications@github.com wrote:

You have to put this codeline in src/TapkuLibrary/TKCalendarMonthView.h otherwise it doesn't know the instance method for the selector

TKCalendarMonthView.h

(NSArray) calendarMonthView:(TKCalendarMonthView)monthView colorsForMarksFromDate:(NSDate)startDate toDate:(NSDate)lastDate;

Reply to this email directly or view it on GitHub.

@superprat

Copy link
Copy Markdown
Author

I'm adding a bit more to customize the type of marker also, will upload a demo soon

On 10-Oct-2012, at 7:14 PM, Fokke Vermeulen notifications@github.com wrote:

Can you add an Example how to use this? I get errors.


Reply to this email directly or view it on GitHub.

@fvermeulen

Copy link
Copy Markdown

Hey thank you. I think i only need to know, what i have to put in the array.

@superprat

Copy link
Copy Markdown
Author

UIColor object

On 15-Oct-2012, at 3:45 PM, Fokke Vermeulen notifications@github.com wrote:

Hey thank you. I think i only need to know, what i have to put in the array.


Reply to this email directly or view it on GitHub.

@fvermeulen

Copy link
Copy Markdown

Thank you. It works ;)

…t's datasource delegate

-(void)calendarMonthView:(TKCalendarMonthView *)monthView didLongPressDate:(NSDate *)date;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attributes for NSAttributedString such as NSFontAttributeName are available only for iOS 6 or newer. If one needs to use NSAttributedString for iOS 5 or older, it must be done by using CoreText (kCTFontAttributeName and such).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants