In my iPhone app, I have a control that has different sizes on different screens. For example, (in iOS point coordinates)
- 3.5-inch devices (iPhone 4S): 242x295
- 4-inch devices (iPhone 5 Series, SE): 242x383
- 4.7-inch devices (iPhone 6 series): 297x482
- 5.5-inch devices (iPhone 6 Plus series): 336x551
As you can see, these control sizes are not proportional.
Problem
This control has an image as a background. This particular image is important for identifying the brand and the look that my designer wants to work with. The image gives the appearance of the material and has a texture. He also has shadows within himself. I would like to use this image to control various screen sizes (the sizes of my controls are determined at runtime according to the available space, since Apple can come up with new screen sizes at any time).
My current solution
The designer makes a separate PNG for me for each screen size, and I hardcode it using my control, using if-else for the screen size (after determining the size mathematically before hand). As you can probably tell, this is a terrible approach to reliability. I also want to expand access to the iPad and, of course, help to improve the zoom system.
Idea I take the image, which is the smallest unit of repeating texture, and apply it to my control using the zoom option, which repeats it everywhere to get the final image. HOWEVER, I lose my shadows and rounded edges this way. (I tried just using the largest image, and disproportionate scaling makes the rounded edges awful)
I tried to look for solutions, and most resources do not deal with such images. I simply cannot lose some of this image, and it must be fully applied to the controls, shadows and corners.
I apologize if all or all of this is naive or I did not look for answers using the right words. This is my first Stack Overflow post and I look forward to seeing you guys.
Thanks!
R
Edit:

This applies to a custom UIButton-based control to provide the appearance of a map.
Edit 2: Wayne seems to have suggested the perfect answer. I will try and let everyone understand the results.