iOS 中frame 和 bounds 的区别
来源:互联网 发布:海文考研 知乎 编辑:程序博客网 时间:2024/05/19 15:20
根据我的理解,简单点说就是:
一个视图在view中的位置由两部分确定:origin(起点坐标 )和 size(大小)。
看代码:
GRectMake(self.view.frame.origin.x,self.view.frame.origin.y, self.view.frame.size.width,self.view.frame.size.height);
其中self.view.frame.origin.x,self.view.frame.origin.y可以是任意位置
而bounds的起点只能为零,表示的是当前视图自己的坐标
NSLog(@"%d,%d",self.view.bounds.origin.x,self.view.bounds.origin.y);
结果为0 0
0 0
- iOS 中frame 和 bounds 的区别
- iOS中frame和bounds的区别
- iOS中frame和bounds的区别
- iOS中frame和bounds的区别
- ios 中UIView bounds 和 frame 属性的区别
- iOS中frame和Bounds之间的区别
- IOS 中frame bounds origin的区别
- iOS中frame与bounds的区别
- iOS Frame和bounds的区别
- iOS View frame和bounds的区别
- iOS---frame和bounds的区别
- iOS,frame和bounds的区别
- iOS frame和Bounds 以及frame和bounds区别
- iOS 一一 frame和Bounds 以及frame和bounds区别
- frame 和bounds 的区别
- bounds和frame的区别
- frame和bounds的区别
- frame 和 bounds 的区别
- 云存储为移动开发者带来了什么?
- owb之数据不兼容和数据不匹配的区别
- c++ 复习笔记
- (libgdx学习)mesh的简单使用——第一个三角形
- 201111621401-白乐乐-随机生成一个n bit位的长整数
- iOS 中frame 和 bounds 的区别
- Section Object
- 手动JAR打包
- windows下命令行调用R脚本
- Andriod开发历程之一
- Ubuntu安装boost和boost threadpool
- BroadcastReceiver
- EasyRec推荐
- 安卓进度条组件ProgressBar的使用