图片拉伸

第一种方式:

 bg = [bg resizableImageWithCapInsets:UIEdgeInsetsMake(10,10,10,10)];//默认是平铺 

 bg = [bg resizableImageWithCapInsets:UIEdgeInsetsMake(10,10,10,10) resizingMode:..];//平铺和拉伸

第二种方式:

bg = [bg stretchableImageWithLeftCapWidth: topCapHeight:];

     把官方计算拷贝

     // 1 == width - leftCapWidth - right cap

     // 1 == height - topCapWidth - bottom cap

     // 只拉伸1*1的像素

   

 

posted @ 2020-04-06 23:35  千面客  阅读(181)  评论(0)    收藏  举报