-
Notifications
You must be signed in to change notification settings - Fork 247
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
base: master
Are you sure you want to change the base?
Conversation
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
Hi guys, Eager to see this functionality available on master. Could we go ahead and merge back these changes? |
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.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.