¡@

Home 

2014/10/15 ¤U¤È 10:14:06

iphone Programming Glossary: shapelayer

How to crop the image using UIBezierPath?

http://stackoverflow.com/questions/13153223/how-to-crop-the-image-using-uibezierpath

pointString aPath closePath iphone objective c ios uibezierpath share improve this question You can use a shapeLayer for that. Something like UIBezierPath aPath UIBezierPath bezierPath for NSString pointString in pointArray if pointArray.. CGPointFromString pointString else aPath addLineToPoint CGPointFromString pointString aPath closePath CAShapeLayer shapeLayer CAShapeLayer layer shapeLayer.path aPath.CGPath view.layer setMask shapeLayer or make it as imageview.layer setMask shapeLayer.. else aPath addLineToPoint CGPointFromString pointString aPath closePath CAShapeLayer shapeLayer CAShapeLayer layer shapeLayer.path aPath.CGPath view.layer setMask shapeLayer or make it as imageview.layer setMask shapeLayer and add imageView as subview..

“Masking” an animation? iPhone SDK

http://stackoverflow.com/questions/1763620/masking-an-animation-iphone-sdk

layer. Something like CGMutablePathRef path CGPathCreateMutable build the path by adding points ... CAShapeLayer shapeLayer CAShapeLayer alloc init shapeLayer setPath path shapeLayer setFillColor UIColor blackColor CGColor Set shape layer bounds.. path CGPathCreateMutable build the path by adding points ... CAShapeLayer shapeLayer CAShapeLayer alloc init shapeLayer setPath path shapeLayer setFillColor UIColor blackColor CGColor Set shape layer bounds and position ... Set the mask for.. build the path by adding points ... CAShapeLayer shapeLayer CAShapeLayer alloc init shapeLayer setPath path shapeLayer setFillColor UIColor blackColor CGColor Set shape layer bounds and position ... Set the mask for the image view's layer..