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

Although you can change the frame
, bounds
, 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 thebounds
property changes to match the new size of the frame rectangle. The value in thecenter
property similarly changes to match the new center point of the frame rectangle.When you set the
center
property, the origin value in theframe
changes accordingly.When you set the size of the
bounds
property, the size value in theframe
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的更多相关文章
- iOS下bound,center和frame
本文转发至:http://www.xuebuyuan.com/1846606.html 在写程序的时候发现,iOS下的坐标.位置很容易弄乱,特别是在不同的坐标系统中,必须完成弄明白一些概念才能做相应的 ...
- iOS学习笔记:frame,bound,center, anchorPoint
frame: View在它的Super View坐标系里的坐标 bound: 用来定义View自身坐标系和边界的Rect,Rect的原点表示View自身坐标系的原点坐标.举个例子: 一般情况下boun ...
- frame.bounds和center
CGPoint point=CGPoint(x,y); //表示位置 CGSize size=CGSzieMake(width,height); //表示大小 CGRect rect=CGRect ...
- UIView frame, bounds and center
http://stackoverflow.com/questions/5361369/uiview-frame-bounds-and-center Since the question I asked ...
- ios frame、bound和center定义及使用场景总结
frame:指的是视图在父视图的坐标系统中的大小和位置. bound:指的是视图在视图本身的坐标系统中的大小(位置起点是原点). center:指的是视图在父视图坐标系统中的中心点. frame和bo ...
- iOS - Frame 项目架构
前言 iOS 常见的几种架构: 标签式 Tab Menu 列表式 List Menu 抽屉式 Drawer 瀑布式 Waterfall 跳板式 Springborad 陈列馆式 Gallery 旋转木 ...
- ios frame bounds applicationframe
ios里面的[uiscreen mainscreen]获得的frame是应用的frame大小,不包含status bar,所以高度会少20,但是self.view的frame就是表示整个可视的窗口的大 ...
- iOS frame从导航栏下面开始
iOS7.0 之后,页面布局默认延伸到了手机界面的边缘;导航栏背景成透明颜色. 解决fram从导航栏下面开始方法: 第一种: 将导航栏改成不透明即可 if( ([[[UIDevice currentD ...
- UIView 中 frame, bounds, center 属性的关系
最近一直在学 iOS 开发,所以专门创建了这样一个类别,将自己学习中的一些问题整理,记录下来.由于自己是初学者,所以所写的文章非常基础,写这个类别一是为了给自己留下存 档,二是为了给和我有同样问题的初 ...
随机推荐
- hdu 1085 给出数量限制的母函数问题 Holding Bin-Laden Captive!
Holding Bin-Laden Captive! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Ja ...
- 【Linux】- 获取root权限命令
1:Redhat系统或者Fedora或者CentOs的Linux发行版,那么在Linux终端输入命令回车: su - root 这样就可以切换到root权限了 2:Ubuntu系统,在Linux终端输 ...
- 【bzoj3029】守卫者的挑战 概率dp
题目描述 给出一个数$m$和$n$次操作,第$i$操作有$p_i$的概率成功,成功后会使$m$加上$a_i$($a_i$为正整数或$-1$),求$n$次操作以后成功的操作次数不少于$l$且$m\ge ...
- [SDOI2015][bzoj4518] 征途 [斜率优化dp]
题面 传送门 思路 把$vm^2$展开化一下式子,可以得到这样的等价公式: $vm^2=m\sum_{i=1}^m a_i^2-\sum_{i=1}^m a_i$ 那么我们要最小化的就是$\sum_{ ...
- bzoj1264 [AHOI2006]基因匹配Match 树状数组+lcs
1264: [AHOI2006]基因匹配Match Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 1255 Solved: 835[Submit][ ...
- 搭建自己的YUM源HTTP服务器
createrepo是linux下的创建仓库的软件包.create是创建的意思,repo是repository的缩写,是仓库的意思.yum(Yellowdog Updater,Modified)主要的 ...
- 转 DNS原理及其解析过程【精彩剖析】
DNS原理及其解析过程[精彩剖析] http://369369.blog.51cto.com/319630/812889/ DNS原理及其解析过程 精彩剖析 网络通讯大部分是基于T ...
- Android wifi驱动的移植 realtek 8188
Android wifi驱动的移植 一般我们拿到的android源代码中wifi应用层部分是好的, 主要是wifi芯片的驱动要移植并添加进去. wifi驱动的移植, 以realtek的8188etv为 ...
- (二十五)epoll深入理解续
转自:http://blog.csdn.net/yusiguyuan/article/details/15027821 在Linux的网络编程中,很长的时间都在使用select来做事件触发.在linu ...
- windows 添加自助白名单
由于公司分部用的是动态IP,又需要用到总部的OA系统,OA完全开放对外不安全,所以写了这个工具 项目地址 https://github.com/cainiaoit/Windows-firewall-s ...