cashapelayer Questions

2

I have a UIImageView. Inside that I am drawing a line wit user touch event. Problem is that a line can be drawn anywhere in UIImageview, but I like to draw line with image pattern only. For exampl...
Dispersoid asked 9/1, 2016 at 12:49

1

Solved

Inspired by this example, I have a created custom CALayer subclasses for wedges and arcs. The allow me to draw arcs and wedges and animate changes in them so that they sweep radially. One of the f...
Toothless asked 6/10, 2015 at 0:39

1

Solved

I'd like to animate a shape as it transitions from a circle to a rounded-corner triangle. TL;DR: How do I animate a CAShapeLayer's path between two CGPath shapes? I know that they need to have the...
Borne asked 20/5, 2015 at 6:34

1

Below i have attached image,I want to achieve the below animation.I have tried water wave animation but don't know how to control the animation like the above. I have CAShapeLayer in which i have ...
Hodosh asked 20/7, 2015 at 14:41

1

I am trying to rotate a CAShapeLayer by an angle from its current angle whenever a button is pressed. I am using delegate function animationDidStop to set the transform of the layer during end of...

2

Solved

I'm trying to create a bezier path like the instagram triangle in the picture below, however I must be doing something wrong. The Bezier path does not show! - (void)viewDidLoad { [super viewDidLoa...
Wolframite asked 14/6, 2015 at 1:48

2

Solved

I can't seem to remove the animation from the strokeEnd property of my CAShapeLayer. The documentation says the property is animatable but not that is animated by default and I can't pinpoint the ...
Adrenalin asked 10/5, 2015 at 10:28

0

I've got multiple bezier paths which are incorporated into CAShapeLayers for animation purposes. I need to know if it is possible to merge all of the layers into one collection object so that I can...
Forcefeed asked 20/4, 2015 at 16:45

1

Solved

In swift I've successfully made an animated bezier path which is contained inside a CAShapeLayer. My only problem is implementing it onto other screen sizes. Does anybody know how I can scale the C...
Rohr asked 20/4, 2015 at 5:47

2

Solved

I have a custom button that I want to make top-left border of it look like normal round rectangle. I found code that makes all corners round: _myButton.layer.cornerRadius = 8; _myButton.layer.bor...
Deflection asked 8/10, 2012 at 22:3

3

is there a nice way to calculate the position of a path (CGPath or UIBezierPath) at a given time (from 0 to 1)? Using CAShapeLayer for example, one can create an animated stroke end. I want to kno...
Gilbertogilbertson asked 16/12, 2013 at 22:24

3

Solved

I'm trying to draw a circle using UIBezierPath addArcWithCenter method : UIBezierPath *bezierPath = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(0., 0., 100., 100.)]; [bezierPath addArcWit...
Dialogue asked 23/9, 2014 at 10:25

2

I've been playing around with drawing a path using a CAShapeLayer as outlined in this great article, http://oleb.net/blog/2010/12/animating-drawing-of-cgpath-with-cashapelayer, but I'm wondering if...
Niagara asked 4/5, 2011 at 16:28

1

Solved

I am having a predicament that's very similar to the one described in this SO thread. I read through every answer on that thread and was unable to find any that solved my problem. I've narrowed dow...
Tess asked 2/8, 2014 at 21:13

2

Solved

I am trying to draw a circle that will be used to indicate progress. The progress updates might come in quickly, and I want to animate the changes to the circle. I have tried doing this with the b...
Buckjumper asked 19/2, 2014 at 6:18

1

Solved

I am trying to create a button with a triangle icon/shape in it. I have created the triangle in Paintcode then copied the beizer path and added it to the button layer as below. -(void)setupShowHid...
Revengeful asked 15/7, 2014 at 22:12

4

I am working on CAShapeLayer.And trying to draw non-linear path.I want to set frame to CAShapeLayer.So i can use CGPathGetPathBoundingBox method to get frame from CGPathRef. Here is code : CGMut...
Brainsick asked 23/9, 2013 at 8:53

2

I would like to add a circular mask to UIImageVIew. Here is the function that am using to add the mask.. - (void) addMaskToBounds:(CGRect) maskBounds { CAShapeLayer *maskLayer = [[CAShapeLayer al...
Reimer asked 9/3, 2013 at 5:43

1

Solved

I want to simulate eraser effect with touch event to show a image that behind something block on top, eg, gray color; Something like that: I have find for a long time for the solution but I can...
Paries asked 2/6, 2014 at 14:56

1

I'm trying to implement the next curious thing: I have a few dots and I'd like to link them with sine waves Next method returns the array of dots for making plot: - (NSArray *)plotPointsBetweenPo...
Mickelson asked 10/4, 2014 at 11:30

1

In short: Apple does NOT set the frame or bounds for a CAShapeLayer automatically (and Apple HAS NOT implemented an equivalent of [UIView sizeThatFits]) If you set the frame using the size of the...
Popp asked 29/12, 2011 at 0:5

2

Solved

I'm using a CAShapeLayer. I'm trying to make it so that its path changes whenever a mouse event occurs. For example, when a mouse down event occurs, a path is appended to a CGMutableRefPath and the...
Assurbanipal asked 2/8, 2013 at 20:20

1

I'm trying to add a subpath to my CAShapeLayer's path, but the changes doesn't show unless I first assing nil to the path and then I reassign myPath to the CAShapeLayer. I've tried with setNeedsRed...
Impunity asked 11/8, 2012 at 20:13

3

Solved

I have used CAShape Layer before doing basic transformation on paths - from a smaller circle into a larger circle. Good enough, but then I tried to transform a triangle into a circle; it worked, bu...
Interaction asked 25/7, 2013 at 13:0

1

Solved

I have been reading the documentation on CAShapeLayer but I still don't quite get it. From my understanding, Layer is always flat and its size is always a rectangle. CAShapeLayer on the other han...
Shimmer asked 8/6, 2013 at 10:44

© 2022 - 2024 — McMap. All rights reserved.