-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hello shiami,
Thank you for this library. It saved my day.
Your "+ (UIImage_)createResizableImageFromNinePatchImage:(UIImage_)" method has a problem with images ending "@2x".
for @2x images image.size.width and ....height returns values as points not pixels. To fix that you can multiply image.size.width with image.scale.
I fixed the problem by adding
float scl = ninePatchImage.scale;
int w = ninePatchImage.size.width * scl;
int h = ninePatchImage.size.height * scl;
at the beginning of your "+ (UIImage_)createResizableImageFromNinePatchImage:(UIImage_)" method and replaced all remaining
"ninePatchImage.size.width" with w and
"ninePatchImage.size.height" with h.
Rest of the code is awesome.
Metadata
Metadata
Assignees
Labels
No labels