NSTimer-Blocks
NSTimer-Blocks copied to clipboard
Quick fixes to make this a tad nicer/safer.
Your category name (and filename, but that I can influence by placing your file in a subfolder) is unsafe. If I add another framework that uses similar utility code, I may get a collision and not even notice it. So I've prefixed the category name. Ideally, the files would be named "NSTimer+JDBlocks.*" as well, but I presume that'd break stuff for you at this point.
I also moved the timer into a dictionary. Not strictly necessary, but provides for less surprise (all other classes restrict userInfo to dictionaries). And finally, found a trailing ';' in an implementation that I cleaned up.
All these edits were done on Github, so I hope this still compiles.
Huh. Somehow it included the ARC merge I made after doing this pull request. That wasn't intended. But if you want, merge that too. I think it's nice and small.
:+1: I came here to say the very same thing.