cashapelayer Questions
1
Solved
According to this answer by ldoogy, setting the drawsAsynchronously property of CALayer to true enables a Metal based renderer vastly improving performance.
This webpage affirms Idoogy's claim.
How...
Crosscountry asked 14/1 at 6:57
8
Solved
I have designed the following code to generate a UIBezierPath. This path is used within a CAShapeLayer to mask a UIView. Note, the view's height and width are variable.
This code generates a triang...
Stantonstanway asked 7/12, 2013 at 13:59
4
Solved
I have a strange question. Even though I did read a lot of tutorials on how to do this, the final result only shows the bezier line, not any shadow whatsoever. My code is pretty simple :
let borde...
Barajas asked 18/3, 2015 at 15:36
5
I'm trying to figure out how to mask a UIView to display a shape that represents a Square with half of a circle sitting ontop of it.
Basically, it would be like applying a border radius to only t...
Discard asked 19/1, 2016 at 13:35
6
Solved
I created a rectangle using following code and now I need to rounded the corners of this rectangle. but I can't find a property called layer.cornerRadius, can anyone help me ?
class OvalLayer: CAS...
Bituminize asked 28/1, 2016 at 5:54
3
Solved
I am trying to round top corners using below code
func roundCorners(corners:UIRectCorner, radius: CGFloat) {
let path = UIBezierPath(roundedRect: self.bounds,
byRoundingCorners: corners,
corne...
Daile asked 12/9, 2017 at 15:0
4
Solved
I have coded as below for half circle in iOS using UIBezierPath and CAShapeLayer.
clockWiseLayer = [[CAShapeLayer alloc] init];
CGFloat startAngle = -M_PI_2;
CGFloat endAngle = M_PI + M_PI_2;
C...
Rood asked 23/8, 2015 at 9:17
1
Solved
I have a CAShapeLayer based on this answer that animates along with a UISlider.
It works fine but as the shapeLayer follows along its just 1 red CAGradientLayer color. What I want is the shapeLaye...
Glacial asked 22/3, 2022 at 3:36
5
Solved
I wish to animate the color fill of a section of a pie chart. I create the pie chart by creating a UIBezierPath() for each piece of the pie and then use the addArc method to specify the size/constr...
Thrill asked 27/6, 2017 at 16:9
5
Solved
How do I fill a CAShapeLayer() with a gradient and on an angle of 45 degrees?
For example, in Image 1, the below code draws a square and fills the layer blue (UIColor.blueColor().CGColor).
But, h...
Askins asked 7/12, 2016 at 14:14
4
Solved
The following is a image for which the the code does not align the centre of the UIView , white color.
CAShapeLayer *layer = [CAShapeLayer layer];
layer.anchorPoint=CGPointMake(0.5, 0.5);
layer.p...
Topmast asked 4/6, 2016 at 1:4
4
Solved
I need to create a UIView that has the left border inclined with 45 degrees
I was wondering,is there a way to acheive this programmatically?
Does CATransform3D help me in this case since it’s not r...
Hyoscyamus asked 13/10, 2014 at 12:23
2
Solved
I have some CGPath (a poly with two circle) carried out on a CAShapeLayer.
Can I trim/subtract paths like this?
Melvamelvena asked 14/10, 2013 at 13:24
3
Solved
I need to know how I can scale down or up CGPath so it can fit UIView?
Set the background color to yellow, To see the view clearly
self.frame = CGRectMake(0, 0, 181, 154);
self.backgroundColor = [U...
Henninger asked 26/3, 2013 at 17:27
5
Solved
I try to change a circle into a square and vice versa and I am almost there. However it doesn't animates as expected. I would like all corners of a square to be animated/morphed at the same time bu...
Ohmage asked 16/7, 2014 at 18:40
3
Solved
I have a question about how to apply multiple masks to a UIView that already has a mask.
The situation:
I have a view with an active mask that creates a hole in its top left corner, this is a temp...
Becnel asked 6/6, 2018 at 11:38
1
Solved
I'm trying to draw a circle that starts and ends at 12 o'clock counterclockwise. The issue I'm having is that the shape is not being drawn.
Im' using init(arcCenter center: CGPoint, radius: CGFloat...
Huntley asked 8/10, 2020 at 23:35
3
Solved
I have a problem clipping a view using CAShapeLayer-UIBezierPath , I want to clip the content but I end up getting a stroke (frame) with that UIBezierPath , This is my code
UIBezierPath *path2Pat...
Mertens asked 19/6, 2015 at 12:27
2
Solved
In questions like How to draw a smooth circle..., ...Draw Circle... and ...draw filled Circles the question and answer is very broad, contains lots of unnecessary steps and the methods used isn't a...
Furfural asked 10/2, 2015 at 21:49
4
Solved
I'm trying to draw a animated circle but every segment needs to have another color. Now everything works except that my piece that is just drawed before I call the method again disappears so only t...
Cerebral asked 23/3, 2015 at 12:6
3
Solved
I'm trying to add a custom shape to an imageView. Please check the below images.
This is the required one:
This is what I have done so far:
I'm new to Core Graphics and I have done this so f...
Avatar asked 11/1, 2020 at 11:18
1
I just draw path using UIBezierPath and i would like to get each and every CGPoint that come under UIBezierPath.
I try with following code
func forEach( body: [![enter image description here][1]...
Habituate asked 22/11, 2019 at 7:7
5
Solved
I've been able to get pretty far with what I've been wanting to accomplish, and that's to replicate iOS's built in circular photo cropper for the built in contacts app. However, I'm stuck at trying...
Purcell asked 27/12, 2013 at 3:8
5
Solved
Here is my class and it'll draw a circle, it looks like this:
class OvalLayer: CAShapeLayer {
let animationDuration: CFTimeInterval = 0.3
override init() {
super.init()
fillColor = Color...
Cf asked 27/1, 2016 at 12:45
2
I have these 2 functions bellow in my class which extends CAShapeLayer, but I can't get an arc with rounded end caps every time I draw the path. It looks always like this picture:
I already trie...
Metts asked 31/7, 2016 at 23:41
1 Next >
© 2022 - 2024 — McMap. All rights reserved.