一個(gè)圖片拉伸的問(wèn)題
從
拉伸成
還有另外一個(gè)問(wèn)題
我看了一個(gè)做聊天頁(yè)面的demo
這個(gè)demo用xcode的界面工具查看時(shí)
是看到這種效果
但是實(shí)際顯示卻是
這個(gè)demo中用的圖片拉伸的方法是resizableImageWithCapInsets
為什么會(huì)造成這兩種顯示區(qū)別呢?
PS:我嘗試用resizableImageWithCapInsets
來(lái)拉伸我想要的氣泡
效果是這樣的
認(rèn)證高級(jí)PHP講師
This depends on which version your application needs to be compatible with. If the minimum compatibility is iOS7
, then simply find the corresponding image in Images.xcassets
. There is a button Show Slicing
in the lower right corner of the preview area, click it. Adjust the stretch area like Android
for 9.png
.
If you want to be compatible with iOS6
, in this case, you need to cut the middle of the picture vertically into two pieces, one to fill the left side and one to fill the right side.