UIView.clipsToBounds 让子 View 只显示落在父 View 的 Frame 部分;是子视图超出不现实,默认为NO,设置为YES就会把超出的部分裁掉。

maskToBounds 是 CALayer 的属性,基于 View  的不少属性其实就是作用于 CALayer 的。子图层是否剪切图层边界,默认为NO

blueView.layer.maskToBounds = YES 与 blueView.clipToBounds = YES 的效果是一样的,随便设置哪个属性都可。

clip to bounds 和mask to bounds的区别的更多相关文章

  1. iOS界面篇 - bounds和frame的相同和区别

    相同点: 他们都是CGRect类型,且拥有属性origin(x, y),  size(weight, height) 不同点: bounds是你画的视图的边界,和父视图没有半毛钱关系 frames则一 ...

  2. 关于Depth Bounds Test (DBT)和在CE3的运用

    Depth Bounds Test (DBT) Depth Bounds Test(深度范围检测),是Nvdia GeForce 6系列以后显卡的特性(GPU Programming Guide Ge ...

  3. bounds的剖析

    bounds的剖析:   UIScrollView的常见属性: contentSize:滚动范围,内容的尺寸(CGSize) contentInset :内边距:内容的上左下右的边距(UIEdgeIn ...

  4. 手写控件,frame,center和bounds属性

    一.手写控件 1.手写控件的步骤 (1)使用相应的控件类创建控件对象 (2)设置该控件的各种属性 (3)添加控件到视图中 (4)如果是button等控件,还需考虑控件的单击事件等 (5)注意:View ...

  5. 在Unity中如何取得一个Box的Bounds

    private BoxCollider mCollider; // Use this for initialization void Start () { mCollider = GetCompone ...

  6. iOS开发UI篇—手写控件,frame,center和bounds属性

    iOS开发UI基础—手写控件,frame,center和bounds属性 一.手写控件 1.手写控件的步骤 (1)使用相应的控件类创建控件对象 (2)设置该控件的各种属性 (3)添加控件到视图中 (4 ...

  7. 《View Programming Guide for iOS》之frame、bounds和center之间的关系

    The frame property contains the frame rectangle, which specifies the size and location of the view i ...

  8. 深入探究frame和bounds的区别以及setbounds使用

    [转自]http://blog.csdn.net/hherima/article/details/39501857 在iOS开发中经常遇到两个词Frame和bounds,本文主要阐述Frame和bou ...

  9. ios开发之UIView的frame、bounds跟center属性的区别(附图)

    博文暂时想到什么写什么,不顺理成章,不顺章成篇. 先看几个概念 坐标点Poit:向右侧为X轴正方向的值x,原点下侧为Y轴正方向的值y 大小Size:由宽度width和高度height构成,表示一个矩形 ...

随机推荐

  1. 用nginx-gridFS读取MongoDB的图片及文件(为什么你老是配不成功?)

    最近在部署公司服务器的nginx + mongodb + gridfs环境: 搜索了N多文档,基本上都一样,期间遇到很多问题: 下面是整理的一份搭建文档: 摘要 nginx-gridfs是一个ngin ...

  2. Effective Java 72 Don't depend on the thread scheduler

    Principle Any program that relies on the thread scheduler for correctness or performance is likely t ...

  3. 精----Java读取xml文件的四种方法

    xml文件: Xml代码 <?xml version="1.0" encoding="GB2312"?> <RESULT> <VA ...

  4. APP 接口开发及读取静态缓存

    <?php /** * Description: App 接口 * Create date:2015-10-19 13:36 * Author: zhaoyingnan **/ class Re ...

  5. linux chromuim安装常用插件(flash,手势,拖拽,广告屏蔽)

    1.本机kali2.0  64位,kali基于Debian.文章所用的所有插件请到http://files.cnblogs.com/files/yuuyuu/chromium_plugins.tar. ...

  6. TCP连接与关闭

    1.建立连接协议(三次握手) (1)客户端发送一个带SYN标志的TCP报文到服务器.这是三次握手过程中的报文1. (2) 服务器端回应客户端的,这是三次握手中的第2个报文,这个报文同时带ACK标志和S ...

  7. makefile中的伪目标

    伪目标就是总是被执行的目标,相对于目标来说,伪目标不会去考虑它的依赖的时间戳与自己时间戳的新旧关系,从而决定是否执行规则.伪目标格式: .PHONY:clean clean: -rm *.o 在mak ...

  8. Hive conf issue

    Hive --hiveconf v1="test" --hiveconf v2 -e "select * from ${hiveconf:v1} where col1=' ...

  9. 边工作边刷题:70天一遍leetcode: day 88

    Unique Word Abbreviation 要点: 简单题,主要是理解题意.no other words have the same abbreviation as the given word ...

  10. 推荐——Monkey《大话 app 测试——Android、iOS 应用测试指南》

    <大话移动——Android与iOS应用测试指南> 京东可以预购啦!http://item.jd.com/11495028.html 当当网:http://product.dangdang ...