frame:指的是视图在父视图的坐标系统中的大小和位置。

bound:指的是视图在试图本身的坐标系统中的大小(位置起点是原点)。
center:指的是视图在父视图坐标系统中的中心点。
贴张苹果官网的图:
frame和bound的关系
 
下面这是其中一个发生变化,其余两个的变化,直接看吧,很浅显。
 

Although you can change the framebounds, and center properties independent of the others, changes to one property affect the others in the following ways:

  • When you set the frame property, the size value in the bounds property changes to match the new size of the frame rectangle. The value in the center property similarly changes to match the new center point of the frame rectangle.

  • When you set the center property, the origin value in the frame changes accordingly.

  • When you set the size of the bounds property, the size value in the frame property changes to match the new size of the bounds rectangle.

By default, a view’s frame is not clipped to its superview’s frame. Thus, any subviews that lie outside of their superview’s frame are rendered in their entirety. You can change this behavior, though, by setting the superview’s clipsToBounds property to YES. Regardless of whether or not subviews are clipped visually, touch events always respect the bounds rectangle of the target view’s superview. In other words, touch events occurring in a part of a view that lies outside of its superview’s bounds rectangle are not delivered to that view.

ios frame,bound和center的更多相关文章

  1. iOS下bound,center和frame

    本文转发至:http://www.xuebuyuan.com/1846606.html 在写程序的时候发现,iOS下的坐标.位置很容易弄乱,特别是在不同的坐标系统中,必须完成弄明白一些概念才能做相应的 ...

  2. iOS学习笔记:frame,bound,center, anchorPoint

    frame: View在它的Super View坐标系里的坐标 bound: 用来定义View自身坐标系和边界的Rect,Rect的原点表示View自身坐标系的原点坐标.举个例子: 一般情况下boun ...

  3. frame.bounds和center

    CGPoint point=CGPoint(x,y);  //表示位置 CGSize size=CGSzieMake(width,height);  //表示大小 CGRect rect=CGRect ...

  4. UIView frame, bounds and center

    http://stackoverflow.com/questions/5361369/uiview-frame-bounds-and-center Since the question I asked ...

  5. ios frame、bound和center定义及使用场景总结

    frame:指的是视图在父视图的坐标系统中的大小和位置. bound:指的是视图在视图本身的坐标系统中的大小(位置起点是原点). center:指的是视图在父视图坐标系统中的中心点. frame和bo ...

  6. iOS - Frame 项目架构

    前言 iOS 常见的几种架构: 标签式 Tab Menu 列表式 List Menu 抽屉式 Drawer 瀑布式 Waterfall 跳板式 Springborad 陈列馆式 Gallery 旋转木 ...

  7. ios frame bounds applicationframe

    ios里面的[uiscreen mainscreen]获得的frame是应用的frame大小,不包含status bar,所以高度会少20,但是self.view的frame就是表示整个可视的窗口的大 ...

  8. iOS frame从导航栏下面开始

    iOS7.0 之后,页面布局默认延伸到了手机界面的边缘;导航栏背景成透明颜色. 解决fram从导航栏下面开始方法: 第一种: 将导航栏改成不透明即可 if( ([[[UIDevice currentD ...

  9. UIView 中 frame, bounds, center 属性的关系

    最近一直在学 iOS 开发,所以专门创建了这样一个类别,将自己学习中的一些问题整理,记录下来.由于自己是初学者,所以所写的文章非常基础,写这个类别一是为了给自己留下存 档,二是为了给和我有同样问题的初 ...

随机推荐

  1. icon fonts generator & svg

    icon fonts generator https://icomoon.io/app/#/select https://icomoon.io/ http://fontastic.me/ http:/ ...

  2. 【Luogu】P2498拯救小云公主(spfa)

    题目链接 我水爆了- - 容易发现可以把两个圆之间连边,左上为起点右下为终点,最小生成树直到起点跟终点连起来,输出边权/2就行. 然后80. 并不理解为什么这可以转化成spfa求最短路,邻接矩阵暴力跑 ...

  3. SecureCRT配置设置

    颜色设置   参考: http://blog.csdn.net/zklth/article/details/8937905 配置导入.导出   参考: http://jingyan.baidu.com ...

  4. hihocoder 后缀自动机二·重复旋律5

    求不同子串个数 裸的后缀自动机 #include<cstring> #include<cmath> #include<iostream> #include<a ...

  5. 获得touch事件,jquery绑定事件监听器,ios设备上打开touch状态以响应focus,active等伪类

    2. 默认的监听方式 document.addEventListener('touchstart', function(){ alert('hello'); }, false); 使用jquery时 ...

  6. mac使用基础

    Mac 系统的桌面 Mac 的桌面是一个很炫的3D, 背景是一张“星空”图. 2 Dock:  在桌面的下方有一排图标, 叫Dock, 用来快速启动程序, 进入文件夹, 它同时还可以停靠正在运行的程序 ...

  7. sql 查找表引用的存储过程

    USE [master] GO /****** Object: StoredProcedure [dbo].[uspGetDepends] Script Date: 05/12/2016 14:11: ...

  8. 电子商务模式B2C/C2C/B2B/O2O

    1.什么是B2C B2C是英文Business-to-Consumer(商家对客户)的缩写,而其中文简称为商对客.商对客是电子商务的一种模式.这种形式的电子商务一般以网络零售业为主,主要借助于互联网开 ...

  9. UVA 10940 Throwing cards away II

    题意略: 先暴力打表发现规律 N=1 ans=1N=2 ans=2N=3 ans=2N=4 ans=4N=5 ans=2N=6 ans=4N=7 ans=6N=8 ans=8N=9 ans=2N=10 ...

  10. Hbase delete遇到的常见异常: Exception in thread "main" java.lang.UnsupportedOperationException

    hbase 执行批量删除时出现错误: Exception in thread "main" java.lang.UnsupportedOperationException at j ...