UIScrollView一、UIScrollView1.常见属性@property(nonatomic) CGPoint contentOffset;//记录UIScrollView滚动的位置@property(nonatomic) CGSize contentSize;//内容尺寸(能滚动的范围)...
分类:
其他好文 时间:
2015-07-05 18:19:40
阅读次数:
83
方法一在touchesMoved中 // 获取到触摸的手指
UITouch *touch = [touches anyObject]; // 获取集合中对象
// 获取开始时的触摸点
CGPoint previousPoint = [touch previousLocationInView:self];
// 获取当前的触摸点
CGPoint...
分类:
其他好文 时间:
2015-07-03 14:04:47
阅读次数:
99
UIView的提供了这个方法:- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event;1.创建CustomView继承自UIView :CustomView.h@property (strong,nonatomic)NSArray ...
分类:
移动开发 时间:
2015-07-01 17:26:22
阅读次数:
334
当需要 屏蔽层的某一部分可以相应 其他部分响应下一层时 可以 这样- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { UIView *hitView = [_backView hitTest:[self convertP.....
分类:
其他好文 时间:
2015-07-01 12:00:12
阅读次数:
121
/** * View抖动效果 */- (void)shakeAnimationForView:(UIView *) view{ CALayer *viewLayer = view.layer; CGPoint position = viewLayer.position; CGPo...
分类:
其他好文 时间:
2015-06-26 10:56:11
阅读次数:
130
// CGPoint 结构体数据原型, 用于声明一个点; 02./* Points. */ 03.? 04.struct CGPoint { 05.CGFloat x; 06.CGFloat y; 07.}; 08.typedef struct CGPoint CGPoint; 09.? 10.typedef CGPoint NSPoint; 11.? ...
分类:
其他好文 时间:
2015-06-24 11:08:30
阅读次数:
133
1 CAGradientLayer *layer = [CAGradientLayer layer]; 2 layer.startPoint = (CGPoint){0.5f, 0.0f}; 3 layer.endPoint = (CGPoint){0.5f, 1.0f}; 4...
分类:
移动开发 时间:
2015-06-23 19:46:49
阅读次数:
152
系统定义的常用结构体NSRangeNSPoint (CGPoint)NSSize (CGSize)NSRect (CGRect)常用的结构体方法初始化NSMakeRangeCGPointMakeCGSizeMakeCGRectMake打印结构体,返回字符串- (NSString *) NSStrin...
分类:
其他好文 时间:
2015-06-17 11:16:08
阅读次数:
118
Foundation框架中包含了很多常用的数据类型:结构体枚举类结构体NSRange 表示范围NSPoint\CGPoint 位置NSSize\CGSize 尺寸NSRect\CGRect 包含位置,尺寸(CGPoint,CGSize)
分类:
其他好文 时间:
2015-06-16 12:36:25
阅读次数:
96
UIScrollView的属性总结属性 作用CGPoint contentOffSet 监控目前滚动的位置CGSize contentSize 滚动范围的大小UIEdgeInsets contentInset 视图在scrollView中的位置iddelegate 设置协议BOOL directio...
分类:
其他好文 时间:
2015-06-11 12:28:51
阅读次数:
106