josharian/xkcd — pull request #33 by paulrehkugler (2013-06-01 02:14:40+00:00)
Title: Fix EXIF Zoom Issue, Some Cleanup, Local Notification Support

Sorry about the gratuitous commits in here. I tried to match your code style as much as I could; let me know if I am doing anything irritating.

The EXIF data was actually really easy to ignore: use a CGImageRef and get it's width and height. That uses the bitmap width and height (exif agnostic). I added a category to UIImage with the property exifAgnosticSize, and updated size accessors where I thought necessary. I may have missed one or two, but everything seems to be working.

I did some cleanup for readability while I was throwing out ivars. Nothing much to see here.

Added local notifications that fire MWF at 2:00 AM EST. This required a new (somewhat messy) category on NSDate. It adds a property for nextMondayWednesdayOrFriday, which returns 2:00 AM EST of the the next Monday, Wednesday, or Friday (whichever is soonest). The next notification gets scheduled when the user leaves the app; if you don't visit after the last notification, it will stay out of your hair. I could set a repeatInterval on these and only set up notifications once, but I like this approach better.

If anything's unclear, let me know.