Resizing an image with stretchableImageWithLeftCapWidth

后端 未结 7 1728
闹比i
闹比i 2020-12-29 00:39

I\'m trying to resize an image using stretchableImageWithLeftCapWidth: it works on the simulator, but on the device, vertical green bars appears.

I\'ve tried to use

相关标签:
7条回答
  • 2020-12-29 01:29

    I have found similar issues with contentStretch (on any UIView that has drawn content) when using a value of (0.5, 0.5, 0, 0). i.e. stretch on the center pixel.

    I have found that only the iphone 3G (possibly 2G) exhibits this problem. iphone 4 and 3GS is OK. So, I assume this is a problem with the old graphics HW.

    a way i found around the problem was to stretch on a slightly larger center area.

    e.g. (0.4, 0.4, 0.1, 0.1)

    0 讨论(0)
提交回复
热议问题