Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Method for UIImage to be able to load images with the -568h prefix on the iPhone5.

Notifications You must be signed in to change notification settings

mindsnacks/UIImage-MSImageNamed568hSupport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

UIImage-MSImageNamed568hSupport

Method for UIImage to be able to load images with the -568h prefix on the iPhone5.

  • 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 just name 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;

About

Method for UIImage to be able to load images with the -568h prefix on the iPhone5.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published