摘要: 效果实现代码:- (CAShapeLayer *)tornPaperLayerWithHeight:(CGFloat)height{ CGFloat width = MAX(CGRectGetWidth([[UIScreen mainScreen] bounds]), CGRectGetHeight([[UIScreen mainScreen] bounds])); CGFloat overshoot = 4; CGFloat maxY = height-overshoot; UIBezierPath *bezierPath = [UIBezierPath bezier... 阅读全文
posted @ 2013-04-22 23:04 欧阳蓝缺 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 此方法可实现点击穿透、点击下层视图功能。一.hitTest:withEvent:调用过程iOS系统检测到手指触摸(Touch)操作时会将其放入当前活动Application的事件队列,UIApplication会从事件队列中取出触摸事件并传递给key window(当前接收用户事件的窗口)处理,window对象首先会使用hitTest:withEvent:方法寻找此次Touch操作初始点所在的视图(View),即需要将触摸事件传递给其处理的视图,称之为hit-test view。window对象会在首先在view hierarchy的顶级view上调用hitTest:withEvent:,此方 阅读全文
posted @ 2013-04-22 21:47 欧阳蓝缺 阅读(9225) 评论(0) 推荐(0) 编辑