Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
733 views
in Technique[技术] by (71.8m points)

ios - Image slicing with SVG images not working on Xcode12

Xcode 12 just introduced SVG image support and I've been using them without major problems, however when I tried image slicing the chat bubbles so they stretch correctly depending on the number of characters in the text message, it doesn't seem to work, can't find anything on stackoverflow or apple forum yet so just wondering if anyone knows if it is a known issue or Xcode 12 bug?

This is the chat bubble SVG:

<svg width="206" height="80" viewBox="0 0 206 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="20.4998" y="16" width="161.484" height="40" rx="20" fill="lightseagreen"/>
<path d="M186 56C175.984 56 169.984 55 169.984 46H177.984C177.984 50.0156 176.984 52 186 56Z" fill="lightseagreen"/>
</svg>

How it looks in Xcode assets:

enter image description here

When I click 'Show slicing' here's how it looks:

enter image description here

Compare to the usual 'Show slicing' of PNG images which are working fine: enter image description here

Thanks


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...