1 //触摸四个方法 2 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 3 UITouch *touch = [touches anyObject]; 4 CGPoint point = [tou...
分类:
移动开发 时间:
2015-09-26 15:55:23
阅读次数:
444
CGFloat: 浮点值的基本类型 CGPoint: 表示一个二维坐标系中的点 CGSize: 表示一个矩形的宽度和高度 CGRect: 表示一个矩形的位置和大小 CGFloat ten=10.0f; CGPoint point = CGPointMake(0.0f, 0.0f); CGSize s...
分类:
其他好文 时间:
2015-09-15 08:13:08
阅读次数:
153
CGRect常见用法和几个CGRect函数CGRect每个视图都使用一个边框定义其界限。这个边框指定了视图的轮廓:其位置、宽度和高度。我们使用Core Graphics结构宋定义边框矩形。对于边框,这通常表示由原点(CGPoint,x和y)和大小(CGsize,宽度和高度)组成的CGRect矩形。下...
分类:
移动开发 时间:
2015-09-10 19:01:36
阅读次数:
205
CAlayer层的属性一、position和anchorPoint1.简单介绍CALayer有2个非常重要的属性:position和anchorPoint@property CGPoint position;用来设置CALayer在父层中的位置以父层的左上角为原点(0, 0)@property CG...
分类:
其他好文 时间:
2015-09-10 12:53:24
阅读次数:
146
一、position和anchorPoint1.简单介绍CALayer有2个非常重要的属性:position和anchorPoint@property CGPoint position;用来设置CALayer在父层中的位置以父层的左上角为原点(0, 0)@property CGPoint ancho...
分类:
其他好文 时间:
2015-09-04 16:59:33
阅读次数:
152
一、UIScrollView属性1.常见的属性// 移动的位置
@property(nonatomic) CGPoint contentOffset;
// 内容的大小
@property(nonatomic) CGSize contentSize;
// 四边扩展的边距
@property(nonatomic) UIEdgeInsets contentInset;2.其他属性// 弹簧效果
@pr...
分类:
移动开发 时间:
2015-08-29 06:20:53
阅读次数:
183
1、UIView的常见的属性@property(nonatomic) CGRect frame;
@property(nonatomic) CGRect bounds;
@property(nonatomic) CGPoint center;
@property(nonatomic) CGAffineTransform transfor...
分类:
移动开发 时间:
2015-08-29 06:19:43
阅读次数:
210
- (UIColor*) getPixelColorAtLocation:(CGPoint)point { UIColor* color = nil; CGImageRef inImage = self.image.CGImage; // Create off screen bitmap conte...
分类:
其他好文 时间:
2015-08-28 21:17:15
阅读次数:
180
开发中常见错误和警告总结(七)1:"No previous prototype for function" warning警告错误解决CGPoint randomPoint(){ int half = 32; int freesize = 240 - 2 * half; retur...
分类:
移动开发 时间:
2015-08-25 23:18:35
阅读次数:
134
Ios“巷自己的定义View和Android类别似在.h文件设置了他的一些财产。方法在.m文件中实现.h文件#import CGPoint CGRectGetCenter(CGRect rect);CGRect CGRectMoveToCenter(CGRect rect,CGPoint cente...
分类:
其他好文 时间:
2015-08-20 22:23:58
阅读次数:
166