bounds的应用
frame是参考父view的坐标系来设置自己左上角的位置。设置bounds可以修改自己坐标系的原点位置,进而影响到其“子view”的显示位置。
改变bounds的大小,则会改变frame的大小和位置
- 新的frame的size等于bound的size。
- 新的frame.x = 旧frame.x - (bounds.size.witdh - 旧frame.size.width)/2
- 新的frame.y = 旧frame.y - (bounds.size.height - 旧frame.size.height)/2
bounds的应用的更多相关文章
- frame和bounds
- frame 是一个以**父视图**为坐标系的位置- bounds 是一个以**自身**为坐标系的位置- 如果改变了bounds 那么会影响子控件的显示位置
- Rect 和 Bounds
Rect 表示一个2D矩形区域 Bounds 表示一个3D的方块区域 http://www.cnblogs.com/crazylights/p/3977348.html
- [UIScreen mainScreen].bounds.size.width 和self.view.frame.size.width的区别
self.view.frame.size.width在导航栏titleView计算frame时会出现宽度不准确的情况,布局出现问题,[UIScreen mainScreen].bounds.size. ...
- NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds
Bugly: Trapped uncaught exception 'NSRangeException', reason: 'NSMutableRLEArray objectAtIndex:eff ...
- ios视图frame和bounds的对比
bounds坐标:自己定义的坐标系统,setbound指明了本视图左上角在该坐标系统中的坐标, 默认值(0,0) frame坐标: 子视图左上角在父视图坐标系统(bounds坐标系统)中的坐标, ...
- Index was outside the bounds of the array. (Microsoft.SqlServer.Smo)
本地ssms是 安装Sqlserver 2008 r2 自带的 远端的server是sqlserver2014 可以连接,可以执行查询语句.但是,不能使用ssms生成对象的脚本.推测ssms 2008 ...
- [[UIScreen mainScreen] bounds] 返回的屏幕尺寸不对
在使用cocos2d-iphone 2.0生成项目的时候,用5s测试时全屏中上下一直有黑条,发现[[UIScreen mainScreen] bounds]返回的屏幕尺寸不是320*568的,而是32 ...
- [[UIScreen mainScreen] bounds]获取尺寸不对
http://www.cocoachina.com/bbs/read.php?tid-264373.html [[UIScreen mainScreen] bounds]获取尺寸不对 我在 ...
- iOS--------坐标系统(UIView的frame、bounds跟center属性)
1.概要翻开ios官方开发文档,赫然发现上面对这三个属性的解释如下: frame:描述当前视图在其父视图中的位置和大小. bounds:描述当前视图在其自身坐标系统中的位置和大小. center:描述 ...
- ios基础之 view的frame 与 bounds 的区别 (转)
前言: 学习ios开发有一段时间了,项目也做了两个了,今天看视频,突然发现view的frame和bound两个属性,发现bound怎么也想不明白,好像饶你了死胡同里,经过一番尝试和思考,终于弄明白bo ...
随机推荐
- blender split mesh
https://www.youtube.com/watch?v=yFpxQxEWNc4
- [rook] rook的控制流
以下是rook为一个pod准备可用块存储的过程: 1. rook operator运行,并且在k8s每台机器上运行一个rook agent的pod: 2. 用户创建一个pvc,并指定storagecl ...
- pandas DataFrame apply()函数(1)
之前已经写过pandas DataFrame applymap()函数 还有pandas数组(pandas Series)-(5)apply方法自定义函数 pandas DataFrame 的 app ...
- ph 提交代码的步骤;
ph 提交代码的步骤: git status 查看状态: ls -ah 查看文件: git stash list 查看本地缓存的文件: git branch 查看本地的分支: git checkout ...
- npm WARN React-native@0.35.0 requires a peer of react@~15.3.1 but none was installed.
解决方案: 方法一: npm install -save react@~15.3.1 方法二:在package.json中可以添加依赖 "dependencies": { &quo ...
- [转]$.post() 和 $.get() 如何同步请求
原文地址:https://blog.csdn.net/sunnyzyq/article/details/78730894 由于$.post() 和 $.get() 默认是 异步请求,如果需要同步请求, ...
- Linux 开机启动顺序_005
***了解Linux开机启动顺序之前先了解一下Linux运行级别,通过inittab配置文件查看运行级别的定义: [root@oldboy ~]# cat /etc/inittab # Default ...
- [转] tomcat 7/8 启动非常慢的解决方法
在日志中发现启动慢的地方: -- ::] INFO o.s.c.s.DefaultLifecycleProcessor - Starting beans -- ::] INFO o.s.web.con ...
- Java Observer接口和Observable类实现观察者模式
对于观察者模式,其实Java已经为我们提供了已有的接口和类.对于订阅者(Subscribe,观察者)Java为我们提供了一个接口,JDK源码如下: package java.util; public ...
- linux下vi或vim操作Found a swap file by the name的原因及解决方法
在linux下用vi或vim打开Test.java文件时 [root@localhost tmp]# vi Test.java出现了如下信息: E325: ATTENTION Found a s ...