How to stretch image without looking distorted in iPhone?
-
27-10-2019 - |
Question
I am working on chat application and i want to stretch chat bubble image as per text but not getting how to do that.
Please give your suggestion for this matter.
Thanks
Solution
Look at:
UIImage *image = [[UIImage imageNamed:@"chatBubble.png"] stretchableImageWithLeftCapWidth:5 topCapHeight:5];
This will create an image with the corners 5x5 which doesn't stretch, but with a body that does.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow