-
UIKit uses the -568h prefix to load a different image on the iPhone 5 only for the Default.png. This adds a method via a category to use in replacement for
+[UIImage imageNamed:]
that searches for the file with the prefix for any image. -
If the device is not the iPhone 5, it behaves exactly like
+imageNamed:
On iPhone 5 it looks for the image with the-568h
prefix, and falls back to justname
if it can't find it. -
This just adds a different method on a category, it doesn't do any method swizzling, so it doesn't mess with the system at all.
+ (UIImage *)ms_imageNamed568hSupport:(NSString *)name;