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 开发,所以专门创建了这样一个类别,将自己学习中的一些问题整理,记录下来.由于自己是初学者,所以所写的文章非常基础,写这个类别一是为了给自己留下存 档,二是为了给和我有同样问题的初 ...
随机推荐
- lua中是 ffi 解析 【是如何处理数据包的/pkt是如何传进去的】 fsfsfs
lua中的ffi是如何解析的呢? 拿bcc中对proto的解析说起: metatype是有大学问的: ffi.metatype(ffi.typeof('struct ip_t'), { __index ...
- P1447 [NOI2010]能量采集
题目描述 栋栋有一块长方形的地,他在地上种了一种能量植物,这种植物可以采集太阳光的能量.在这些植物采集能量后,栋栋再使用一个能量汇集机器把这些植物采集到的能量汇集到一起. 栋栋的植物种得非常整齐,一共 ...
- [解决方案]NuGet打包报错: 'X' already has a dependency defined for 'Y'
大家在打包Nuget包的时候,最后会执行以下语句 nuget pack .\ML.Common.SDK.csproj -Prop Configuration=Release 执行此句后,提示以下报错信 ...
- libcurl网络连接使用tcp/ip
CURL *curl; CURLcode res; const char *request = "GETas.xxxxE测试发送"; curl_socket_t sockfd; / ...
- powerdesign相关
1.安装程序和汉化放百度云了 2.打印错误处理 http://jingyan.baidu.com/article/c45ad29cd84e4b051753e2c3.html 3.导出sql http: ...
- Audio Unit 介绍
关于 Audio Unit iOS 提供了音频处理插件,支持混音,声音均衡,格式转化,以及用于录音,回放,离线渲染,实时对话的输入输出.可以动态载入和使用这些强大而灵活的插件,在 iOS 应用中这些插 ...
- Linux 软连接 & 硬链接
1.Linux链接概念Linux链接分两种,一种被称为硬链接(Hard Link),另一种被称为符号链接(Symbolic Link).默认情况下,ln命令产生硬链接. [硬连接]硬连接指通过索引节点 ...
- hdu 4305 概率dp
/* 题目大意:有n个房间由n-1个隧道连接起来,从1号房间开始, 每个节点i都有三种可能: 1.被杀死,回到节点1,概率为ki; 2.找到出口,离开迷宫,概率ei; 3.与它相连的有m个房间,到任意 ...
- css样式小框架
1.如div{...}会给所有的<div></div>增加样式. 2.名前井号“#”:对应html中的标签的id属性,写法为#name.如#p1{...}会给<p id= ...
- SpringBoot设置事务管理
关于事务就不介绍了,前面在研究spring的时候就已经研究过了,参考:https://www.cnblogs.com/qlqwjy/p/7296493.html 这里直接研究springboot中事务 ...