菜鸟教程小白 发表于 2022-12-12 14:35:57

ios - WatchKit 组 : with image and label, 图像得到 4 个圆角中的 2 个圆角


                                            <p><p>我正在尝试在 WatchKit 中并排放置图像和标签的 View 。</p>

<p>我创建了一个水平方向的组,并添加了左对齐的图像和右对齐的标签。</p>

<p>我实际上在这里遇到了两个不同的问题:</p>

<p>(1) 我的图像是正方形的,但是靠在组边缘的图像边缘被修圆了。所以我有两个圆角和两个方角,看起来很糟糕。我希望得到 4 个圆角——但主要是我只需要它保持一致。</p>

<p>(2) 我的标签文字很长,需要换行。在 Interface Builder 中,我将行设置为 2,在 IB 中它正确包装。但是当我运行它时,模拟器中的 View 不会换行,而是被截断。</p>

<p> <img src="/image/IxuKp.png" alt="Screenshot"/> </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>您是否在包含组上设置了圆角半径?如果是这样,它将剪切图像的角。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - WatchKit 组 : with image and label, 图像得到 4 个圆角中的 2 个圆角,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/29088561/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/29088561/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - WatchKit 组 : with image and label, 图像得到 4 个圆角中的 2 个圆角