如何在不看iPhone扭曲的情况下拉伸图像?

时间:2011-05-02 13:05:57

标签: iphone image chat distortion


我正在研究聊天应用程序,我想按照文本扩展聊天气泡图像,但没有得到如何做到这一点 请就此事提出建议 感谢

1 个答案:

答案 0 :(得分:5)

看看:

http://developer.apple.com/library/ios/documentation/uikit/reference/UIImage_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006890-CH3-SW4

UIImage *image = [[UIImage imageNamed:@"chatBubble.png"] stretchableImageWithLeftCapWidth:5 topCapHeight:5];

这将创建一个角落5x5的图像,该角落不会伸展,但会有一个身体。