ocrickard/OCCalendar — pull request #17 by Jomell (2012-12-14 18:23:27+00:00)
Title: Tweaked OCCalendar to fit iPhone layout

Hi Oliver,

Thanks for the great work on OCCalendar!.. This is great and very useful drop in module. I wish to use it for my project(s), but I see it doesn't work perfectly on iPHone layout. So I tweaked it for iPHone and wanted to share my changes.

So I've made some changes as follows:

1. Existing function works as normal, but I've made drawrect to detect if the device is iPhone or iPad and branch the rendering code based on device type.

2. The original code is untouched for iPad so it should work as per before. I copied the original code and tweaked it for iPhone.. So there are now renderCalendarViewForPad and renderCalendarViewForPhone methods in the cal view class.

3. Also added OCArrowPositionNone option, as I needed to not show that arrow on some of my UI..

4. So over all, there's very little changes on the original API.. but there's more code as I replicate the drawrect for iPad.. I can see opportunities to tweak/refactor the code further but unfortunately, like you, I'm pressed for time.. So maybe the next guy can contribute further ; )

Overall though, big THANKS for this great work..

Feel free to review my changes and if you fee it's useful for others, feel free to merge.

Thanks for the great work on your part again.. Cheers!