frame和bounds的区别,boundsVS applicationframe
来源:互联网 发布:编程语言有什么用 编辑:程序博客网 时间:2024/06/05 21:14
1.
frame和bounds是UIView中的两个属性(property)。
frame指的是:该view在父view坐标系统中的位置和大小。(参照点是父亲的坐标系统)
bounds指的是:该view在本身坐标系统中 的位置和大小。(参照点是本身坐标系统)
-(CGRect)frame{ return CGRectMake(self.frame.origin.x,self.frame.origin.y,self.frame.size.width,self.frame.size.height);}
-(CGRect)bounds{ return CGRectMake(0,0,self.frame.size.width,self.frame.size.height);}
2.
ApplicationFrame is the screen size minus the size of the status bar (if visible), bounds is the screen size regardless of status bar.
So applicationFrame would return
CGRectMake(0,0,320,460)
assuming your app has the status bar set to be visible, while bounds would returnCGRectMake(0,0,320,480)
under the same conditions. Those numbers are assuming iPhone/iPod Touch screen sizes.
0 0
- frame和bounds的区别,boundsVS applicationframe
- UIScreen 中的applicationFrame和bounds的区别
- [uiscreen mainscreen].applicationFrame 和 bounds的区别
- [[UIScreen mainScreen] bounds]和 applicationFrame的区别
- [UIScreen mainScreen] ~ bounds和 applicationFrame的区别
- 关于UIScreen的applicationFrame和bounds方法区别
- 关于UIScreen的applicationFrame和bounds方法区别
- [[UIScreen mainScreen] applicationFrame] 和 [[UIScreen mainScreen] bounds]的区别
- frame 和bounds 的区别
- bounds和frame的区别
- frame和bounds的区别
- frame 和 bounds 的区别
- frame和bounds的区别
- frame和bounds的区别
- frame和bounds的区别
- frame和bounds的区别
- bounds和frame的区别
- frame和bounds的区别
- 单点登录SSO的实现原理
- Zend Studio:Fail to create java virtual machine解决方法
- 原地归并排序
- smali第二次进入方法后再执行事件
- ETpl——强复用、灵活、高性能的JavaScript模板引擎
- frame和bounds的区别,boundsVS applicationframe
- 配置SSH jar包异常总结
- Error 9945 received logging on to the standby
- JAVA和.NET开发过程中的不同
- 微软的动漫真人聊天服务Avatar Kinect
- ubuntu 于添加和删除PPA源
- C#中Lambda表达式
- JavaScript实现左右Select列表框交换数据
- js事件驱动机制单oncontextmenu,onselectstart事件