Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show an event marker for particular dates #28

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Show an event marker for particular dates #28

wants to merge 4 commits into from

Conversation

percysnoodle
Copy link
Contributor

This adds a method to the calendar delegate, -calendarView:shouldDisplayEventMarkerForDate:, which allows the delegate to specify that a marker should be displayed under the number.

screen shot 2013-05-10 at 15 11 06

The marker is the bullet character '•' so no additional images are required, and the delegate method is optional so this shouldn't break any existing installations.

@puls
Copy link
Owner

puls commented May 10, 2013

This is wonderful, but I'm a little hesitant to adopt anything that brings its own appearance to the party. Just a couple tweaks and it could be fine.

@@ -127,11 +125,14 @@ - (void)setBeginningDate:(NSDate *)date;

for (NSUInteger index = 0; index < self.daysInWeek; index++) {
NSString *title = [self.dayFormatter stringFromDate:date];
NSString *subTitle = [self.calendarView shouldDisplayEventMarkerForDate:date] ? @"•" : nil;
Copy link
Owner

Choose a reason for hiding this comment

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

Could you extract this logic out? Have a -setEventMarkerVisible:(BOOL)visible forColumnAtIndex:(NSUInteger)index; that does this and can be overridden by the subclass.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had a look at this, and I ran into a problem in -[selectColumnForDate:] where the day button's properties get copied to the selected button. Would it be OK instead to change the button class so it had an eventMarkerVisible property?

@pajai
Copy link

pajai commented Sep 17, 2016

Hi guys,

Eager to see this functionality available on master. Could we go ahead and merge back these changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants