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
frameproperty, the size value in theboundsproperty changes to match the new size of the frame rectangle. The value in thecenterproperty similarly changes to match the new center point of the frame rectangle.When you set the
centerproperty, the origin value in theframechanges accordingly.When you set the size of the
boundsproperty, the size value in theframeproperty 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 开发,所以专门创建了这样一个类别,将自己学习中的一些问题整理,记录下来.由于自己是初学者,所以所写的文章非常基础,写这个类别一是为了给自己留下存 档,二是为了给和我有同样问题的初 ...
随机推荐
- B-Tree索引和Hash索引的区别
Hash 索引结构的特殊性,其检索效率非常高,索引的检索可以一次定位,不像B-Tree 索引需要从根节点到枝节点,最后才能访问到页节点这样多次的IO访问,所以 Hash 索引的查询效率要远高于 B-T ...
- js获取页面元素位置函数(跨浏览器)
function getElementPos(elementId) { var ua = navigator.userAgent.toLowerCase(); var isOpera = (ua.in ...
- HDU - 5919 Sequence II
题意: 给定长度为n的序列和q次询问.每次询问给出一个区间(L,R),求出区间内每个数第一次出现位置的中位数,强制在线. 题解: 用主席树从右向左的插入点.对于当前点i,如果a[i]出现过,则把原位置 ...
- Spring Boot Executable jar/war 原理
spring boot executable jar/war spring boot里其实不仅可以直接以 java -jar demo.jar的方式启动,还可以把jar/war变为一个可以执行的脚本来 ...
- 洛谷 P3168 [CQOI2015]任务查询系统 解题报告
P3168 [CQOI2015]任务查询系统 题目描述 最近实验室正在为其管理的超级计算机编制一套任务管理系统,而你被安排完成其中的查询部分. 超级计算机中的任务用三元组\((S_i,E_i,P_i) ...
- 刷题总结——Throw nails(hdu4393)
题目: Problem Description The annual school bicycle contest started. ZL is a student in this school. H ...
- forEach循环dom元素
//让ie8支持foreach if (typeof Array.prototype.forEach != 'function') { Array.prototype.forEach = functi ...
- lesson 5
C#中的委托(delegate)与事件(event) 一.委托就是中间人的意思,c#中的委托允许将一个类中的方法传递给另一个能调用该方法的类的某个对象.程序员可以将A类的一个方法m(被包含在某个del ...
- .h 和 .cpp 切换快捷键设置(转)
原文转自 https://blog.csdn.net/t163361/article/details/51859274 打开VS后依次选择如下 工具-> 选项-> 环境-> 键盘-& ...
- 为什么js引入页面后不起作用?
为什么js引入页面后不起作用? 例如常见的报错:Uncaught ReferenceError: $ is not defined. 可能出现这种情况的原因如下: 原因一: 引入js的位置不对,应在使 ...