I need to figure out the following:
- Have two layers stacked (Most likely static png's) then in swipe create a feathered layer mask on the top most layer.
- Give the bottom most layer a centered pivot point and have it capable of a full 360 degree rotation. The angle of that bottom most layer will be determined by th开发者_开发问答e angle of the users swipe motion.
This is for a project I'm currently working on and it's these two things that are stumping me. As always, any help is appreciated. Thanks!
Are you referring to layers as CALayer? Is there any reason you don't just use UIViews?
Anyway, layer masks can be easily created on a view:
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = frame;
maskLayer.path = maskPath.CGPath;
controller.view.layer.mask = maskLayer;
精彩评论