开发者

custom button with multiple images

i have 3 images that i would like to use them to generate my custom button. my images are left.png 5x20, right.png 5x20 and mid.png 1x20. my mid.png must be repeated as long as my text lenght. how can i gener开发者_如何学Pythonate it in iphone application on the fly?

thanks.


Look at the leftCapWidth property on UIImage. You need to combine the images into a single PNG file, and then tell it the pixel width of the left part using that property. Then when that UIImage is drawn, it'll resize correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜