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

Calendar Month Grid: Custom image support #172

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

Conversation

robelkin
Copy link

For a project, I had a need to customise the look of the calendar. I thought this might be of interest to others. I implemented some callbacks that can be used on the Calendar Month View to provide images and image views that will make up the month view. Supports replacing the arrow images, the tile images, and the shadow/top images.

I'm not sold on the tile having the month view as its delegate and working out the tile images that way, but I've not thought up a better implementation just yet.

… of it possible without subclassing

e.g. change text alignment, etc
…the call to self.currentDay would be able to use the delegate
…e, which in this case will be the owning month view
…nth view delegate is providing images, or if not we should just provide them ourselves.
Bit dodgy, might need to think about this whole sub delegate pattern
… so it only happens when it has to, and so we have a chance to set the delegate method to override images
… it, if we are then use it for our images, fall back to the bundle images
@robelkin
Copy link
Author

Oh, and I made the title for the calendar available as a property so it can be manipulated (font changes, alignment etc)

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.

None yet

1 participant