<legend id='fP1aa'><style id='fP1aa'><dir id='fP1aa'><q id='fP1aa'></q></dir></style></legend>

    <tfoot id='fP1aa'></tfoot>
    <i id='fP1aa'><tr id='fP1aa'><dt id='fP1aa'><q id='fP1aa'><span id='fP1aa'><b id='fP1aa'><form id='fP1aa'><ins id='fP1aa'></ins><ul id='fP1aa'></ul><sub id='fP1aa'></sub></form><legend id='fP1aa'></legend><bdo id='fP1aa'><pre id='fP1aa'><center id='fP1aa'></center></pre></bdo></b><th id='fP1aa'></th></span></q></dt></tr></i><div id='fP1aa'><tfoot id='fP1aa'></tfoot><dl id='fP1aa'><fieldset id='fP1aa'></fieldset></dl></div>
    • <bdo id='fP1aa'></bdo><ul id='fP1aa'></ul>

      <small id='fP1aa'></small><noframes id='fP1aa'>

        使用 Storyboard 遮罩 UIView 并给出圆角?

        Use Storyboard to mask UIView and give rounded corners?(使用 Storyboard 遮罩 UIView 并给出圆角?)

      1. <small id='man0P'></small><noframes id='man0P'>

        <tfoot id='man0P'></tfoot>

        <legend id='man0P'><style id='man0P'><dir id='man0P'><q id='man0P'></q></dir></style></legend>
          <bdo id='man0P'></bdo><ul id='man0P'></ul>
              <tbody id='man0P'></tbody>

                  <i id='man0P'><tr id='man0P'><dt id='man0P'><q id='man0P'><span id='man0P'><b id='man0P'><form id='man0P'><ins id='man0P'></ins><ul id='man0P'></ul><sub id='man0P'></sub></form><legend id='man0P'></legend><bdo id='man0P'><pre id='man0P'><center id='man0P'></center></pre></bdo></b><th id='man0P'></th></span></q></dt></tr></i><div id='man0P'><tfoot id='man0P'></tfoot><dl id='man0P'><fieldset id='man0P'></fieldset></dl></div>
                  本文介绍了使用 Storyboard 遮罩 UIView 并给出圆角?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  很多问题

                  并启用

                  剪辑子视图

                  结果:

                  Lots of questions like this explain how to programmatically create a mask and provide rounded corners to a UIView.

                  Is there a way to do it all within Storyboard? Just asking because it seems like creating rounded corners in Storyboard keeps a clearer demarcation between presentation and logic.

                  解决方案

                  Yes, I use that a lot but question like this was already answered many times.

                  But anyway in Interface Builder. You need to add User Defined Runtime Attributes like this:

                  layer.masksToBounds Boolean YES
                  layer.cornerRadius Number {View's Width/2}
                  

                  and enable

                  Clips subviews
                  

                  Results:

                  这篇关于使用 Storyboard 遮罩 UIView 并给出圆角?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  iOS AutoLayout - get frame size width(iOS AutoLayout - 获取帧大小宽度)
                  Auto layout constraints issue on iOS7 in UITableViewCell(UITableViewCell中iOS7上的自动布局约束问题)
                  How to resize superview to fit all subviews with autolayout?(如何调整超级视图的大小以适应所有具有自动布局的子视图?)
                  Springs in Auto Layout: Distribute views evenly, with constraints, in Xcode 5(自动布局中的弹簧:在 Xcode 5 中使用约束均匀分布视图)
                  reloadData() of UITableView with Dynamic cell heights causes jumpy scrolling(具有动态单元格高度的 UITableView 的 reloadData() 导致跳跃滚动)
                  What is NSLayoutConstraint quot;UIView-Encapsulated-Layout-Heightquot; and how should I go about forcing it to recalculate cleanly?(什么是 NSLayoutConstraint“UIView-Encapsulated-Layout-Height?我应该如何强制它干净地重新计算?) - IT屋-程序员
                  • <bdo id='89Lxo'></bdo><ul id='89Lxo'></ul>

                        <tbody id='89Lxo'></tbody>

                          <legend id='89Lxo'><style id='89Lxo'><dir id='89Lxo'><q id='89Lxo'></q></dir></style></legend>
                        • <i id='89Lxo'><tr id='89Lxo'><dt id='89Lxo'><q id='89Lxo'><span id='89Lxo'><b id='89Lxo'><form id='89Lxo'><ins id='89Lxo'></ins><ul id='89Lxo'></ul><sub id='89Lxo'></sub></form><legend id='89Lxo'></legend><bdo id='89Lxo'><pre id='89Lxo'><center id='89Lxo'></center></pre></bdo></b><th id='89Lxo'></th></span></q></dt></tr></i><div id='89Lxo'><tfoot id='89Lxo'></tfoot><dl id='89Lxo'><fieldset id='89Lxo'></fieldset></dl></div>
                          <tfoot id='89Lxo'></tfoot>

                          <small id='89Lxo'></small><noframes id='89Lxo'>