1.CGPoint contentOffset:用来表示UIScrollView滚动的位置2.CGSize contentSize:用来表示UIScrollView内容的尺寸,滚动范围3.UIEdgeInsets contentInset:能够在UIScrollView的4周增加额外的滚动区域#im...
分类:
其他好文 时间:
2015-10-26 01:47:31
阅读次数:
120
- (IBAction) renderScrollViewToImage { UIImage* image = nil; UIGraphicsBeginImageContext(_scrollView.contentSize); { CGPoint savedContentOffset = _scr...
分类:
其他好文 时间:
2015-10-19 18:59:36
阅读次数:
202
CALayer层的位置主要和position和anchorPoint有关。其中它们在一起才能决定层在视图中的具体位置。@property CGPoint position; //位置@property CGPoint anchorPoint; //锚点锚点的范围:(0.0~1.0)具体的演示...
分类:
移动开发 时间:
2015-10-15 14:25:19
阅读次数:
173
iOS开发UI篇—CAlayer层的属性一、position和anchorPoint1.简单介绍CALayer有2个非常重要的属性:position和anchorPoint@property CGPoint position;用来设置CALayer在父层中的位置以父层的左上角为原点(0, 0)@pr...
分类:
其他好文 时间:
2015-10-14 21:24:10
阅读次数:
226
彻底理解CALayer的position,anchorPoint属性 与UIView的frame 属性1.position,anchorPoint两者都是CALayer的属性,都是CGPoint点@property CGPoint position@property CGPoint anchorPo...
分类:
其他好文 时间:
2015-10-14 21:23:14
阅读次数:
160
/*** 点击了进度条背景*/- (IBAction)tapProgressBg:(UITapGestureRecognizer *)sender { CGPoint point = [sender locationInView:sender.view]; // 切换歌曲的当前播放时间 se...
分类:
其他好文 时间:
2015-10-14 17:20:55
阅读次数:
373
一、position和anchorPoint1.简单介绍CALayer有2个非常重要的属性:position和anchorPoint@property CGPoint position;用来设置CALayer在父层中的位置以父层的左上角为原点(0, 0)@property CGPoint ancho...
分类:
移动开发 时间:
2015-10-13 00:03:04
阅读次数:
262
在iOS开发中经常需要处理点,大小以及矩形,对应的数据结构分别为CGPoint,CGSize,CGRect,这些数据结构都是C结构体,定义分别如下:CGPoint { CGFloat x; CGFloat y;};CGSize { CGFloat width; CGFloat height;...
分类:
其他好文 时间:
2015-10-13 00:01:41
阅读次数:
237
UIScrollView1.contentOffset/** 内容向外偏移,只在初始状态有效,拉拽后偏移量变回0*/@property(nonatomic) CGPoint contentOffset2.contentSize/** 内容大小*/@property(nonatomic) CGSize...
分类:
其他好文 时间:
2015-10-12 21:02:06
阅读次数:
231
创建一个以OC为开发语言的IOS工程,新建一个类继承与UIView重写一下方法并实现//在.h文件里面声明两个实例变量{ CGPoint _startpoint;//记录点击滑动时的位置 NSMutableArray* _marray;//记录滑动时的位置 }//在.m文件里面//...
分类:
移动开发 时间:
2015-09-29 20:31:18
阅读次数:
195