参考资料:http://blog.csdn.net/hherima/article/details/39501857
在IOS的UI开发中,经常需要对view进行定位。比较常用的概念就是Frame和Bound,通过view这两个属性,就可以任意的“摆弄”我们的view了。
这两个属性都可以定义view的位置和大小,但这两个属性之间有什么区别和联系呢?经过资料查找,记录如下:
Fram...
分类:
移动开发 时间:
2015-05-22 09:51:33
阅读次数:
177
//系统window创建出来(并且给window一个全屏的大小) self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization .....
分类:
其他好文 时间:
2015-05-21 21:50:49
阅读次数:
107
//系统window创建出来(并且给window一个全屏的大小) self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization .....
分类:
其他好文 时间:
2015-05-21 19:20:58
阅读次数:
106
UIButton1 //1.设置UIButton 的左右移动2 .center属性 获得 CGPoint 来修改x y3 //1.设置UIButton 的放大缩小4 bounds属性 获得CGRect 然后通过size.height设置高 wight设置宽 //3.或者使用frame 来设...
分类:
移动开发 时间:
2015-05-21 12:34:45
阅读次数:
131
前言:学习ios开发有一段时间了,项目也做了两个了,今天看视频,突然发现view的frame和bound两个属性,发现bound怎么也想不明白,好像饶你了死胡同里,经过一番尝试和思考,终于弄明白bound的含义。PS:我承认我是一个很笨很笨的人。所以现在记录下来,供以后查阅,同时方便所有和我一样有疑...
分类:
移动开发 时间:
2015-05-20 17:42:29
阅读次数:
123
使tableVIew的头视图使表示图滚动,需要使用设置tableView的分组样式
_tableView
= [[UITableView
alloc]
initWithFrame:self.view.bounds
style:UITableViewStyleGrouped];
如果分组为一组,直接自定义头视图,然后设置为tableView的headerView,
如果为多组,某些组...
分类:
移动开发 时间:
2015-05-18 13:00:54
阅读次数:
164
方法一:直接使用UIView对应图层的cornerRadius self.layer.cornerRadius = CGRectGetWidth(self.bounds)/2.f; self.clipsToBounds = YES;方法二:使用图层遮罩 CAShapeLayer...
分类:
移动开发 时间:
2015-05-17 18:11:46
阅读次数:
439
关于图层的几个坐标系。
对于ios来说,坐标系的(0,0)点在左上角,就是越往下,Y值越大。越往右,X值越大。
一个图层的frame,它是position,bounds,anchorPoint和transform属性的一部分。
设置一个新的frame将会相应的改变图层的position和bounds,但是frame本身并没有保存。
position:是一个CGP...
分类:
移动开发 时间:
2015-05-15 17:48:53
阅读次数:
197
1. UIView的基本用法 //打印屏幕的宽和高 CGRect screenBounds = [[UIScreen mainScreen] bounds]; NSLog(@"%f, %f", screenBounds.size.width, screenBounds.size.h...
分类:
其他好文 时间:
2015-05-12 01:40:04
阅读次数:
138
[1.6.0]
-英文原文:http://www.badlogicgames.com/wordpress/?p=3682-API更改:GlyphLayout xAdvances现在有了额外的开始入口,这需要实现tighter text bounds。-API更改:Label#getTextBounds更改成getGlyphLayout。不仅仅暴露width和height。
在2D Particl...
分类:
其他好文 时间:
2015-05-08 09:27:05
阅读次数:
111