Search code examples
iosautoresizestretchrectstretching

iOS. Complex stretching?


I want to stretch an image using 2 stretch areas. So I need to achieve something like this:

enter image description here

But by default in iOS I can define one rect only.

Is it possible to solve this issue without incision into 2 separate images when each of them has only one rect?


Solution

  • As stated, I would definitely do with 2 images. Or add a category on top of UIImage which does your job. The key is what kind of parameter will you give to the method?