Prior to iOS 5.1 if you wanted to use NSCoding protocols with UIImage you had to do something like this.
@interface UIImage (NSCoding) -(id)initWithCoder:(N
Instead of using a category on UIImage, wouldn't it be cleaner to subclass it?
Then you could implement initWithCoder and encodeWithCoder and use UIImage's NSCoding implementation on 5.1 and your own on pre-5.1.
initWithCoder
encodeWithCoder