Created
July 18, 2014 17:11
-
-
Save nvkiet/b6810366d62bc9e59493 to your computer and use it in GitHub Desktop.
UIImage stretchableImageWithLeftCapWidth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIImage *) resizableImageWithSize:(CGSize)size | |
{ | |
if( [self respondsToSelector:@selector(resizableImageWithCapInsets:)] ) | |
{ | |
return [self resizableImageWithCapInsets:UIEdgeInsetsMake(size.height, size.width, size.height, size.width)]; | |
} else { | |
return [self stretchableImageWithLeftCapWidth:size.width topCapHeight:size.height]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment