Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
38 views

I have a CALayer that I update the contents with a CGImage of a UIImage self.imageLayer.contents = newImage.cgImage I want to animate this change. First I tried this and did not work: CATransaction....
Gizmodo's user avatar
  • 3,024
0 votes
1 answer
117 views

I've loaded a black and transparent .PDF icon to a CGPDFPageRef and need to draw it out to a CALayer with a specified colour. I can scale and rotate it correctly but don't know how to change the ...
user9398585's user avatar
1 vote
2 answers
434 views

This is about iOS 17 only. The only way I could hack around and achieve something like this was find the actual, real, border, get its real values sadly just add a fake on top of that layer once ...
Fattie's user avatar
  • 9,783
0 votes
0 answers
2k views

I'm encountering crashes of type EXC_BREAKPOINT (SIGTRAP) Termination Reason: SIGNAL 5 Trace/BPT trap: 5 on iOS 17. In the iOS app I'm developing, I've noticed that since upgrading to iOS 17 (Xcode 15....
kobunketsu's user avatar
1 vote
1 answer
73 views

Description: I'm currently working on a Drawing application and facing challenges with stroke rendering due to the use of float-based distance calculations. While attempting to convert integer ...
Rezwan Khan chowdhury's user avatar
0 votes
1 answer
78 views

I'm encountering an issue with my drawing functionality in Swift, specifically when using CALayer instead of UIBezierPath. Here's the problem I'm facing: I am creating a texture from an image and ...
Rezwan Khan chowdhury's user avatar
1 vote
1 answer
314 views

I found an extension function to block screeenShot in iOS. But I wounder to know why addSublayer twice. self.layer.superlayer?.addSublayer(textfield.layer) textfield.layer.sublayers?.last?....
JimmyLee's user avatar
  • 569
2 votes
0 answers
42 views

I have a layer-hosting NSView subclass that draws itself using a CALayer object set as its layer. Since it's not a layer-backed view, it doesn't redraw during drawRect: nor during updateLayer, but ...
jeanlain's user avatar
  • 475
0 votes
1 answer
124 views

I'm trying to make an application that will draw on top of a pdf. It is required that graphic shapes be tied to a specific position on the page. To solve the problem, I use PDFView and CALayer, listen ...
Alexey Zhuravlev's user avatar
1 vote
2 answers
89 views

I have a custom UIPresentationController in which I overrode the presentedView as follows: override var presentedView: UIView? { guard let view = super.presentedView else { return nil } ...
PigeonPO's user avatar
  • 108
0 votes
1 answer
352 views

I have an NSView whose layer has various sublayers. Its needsDisplay property is set to YES when the app changes its effective appearance, which ends up calling: -(void)updateLayer { // this is ...
jeanlain's user avatar
  • 475
-1 votes
1 answer
176 views

A custom view has some CALayers as its content. I want to add a consistent rotation animation for the red line. (imagine it as pointer of an analog clock) Expected result: the red line rotates at the ...
cool8jay's user avatar
0 votes
1 answer
110 views

Unfortunately it seems that setting the shadow attributes on the layer directly doesn't work: let shadowView = NSView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) shadowView.wantsLayer = true ...
Nickkk's user avatar
  • 2,747
0 votes
1 answer
125 views

I have applied a gradient to a custom UIView by adding a CAGradientLayer. While this works fine there is small glitch when rotating the device and the view + layer with it. For a short moment the ...
Andrei Herford's user avatar
1 vote
0 answers
84 views

I need to draw in CALayer subclass NSAttributedString with background for every line of text and insets(horizontal and vertical). How to do that? I am trying this code. But, I can't set insets text ...
Vladimir Anisimov's user avatar
0 votes
1 answer
213 views

I want bView to be free of shadows. How can I achieve this? I want to shadow all subviews of the superView, so I cannot remove the shadow settings of the superView. let superView: UIView = UIView(...
MorganChen's user avatar
1 vote
2 answers
883 views

I'm wondering if it's possible to achieve a better performance in converting the UIView into CVPixelBuffer. My app converts a sequence of UIViews first into UIImages and then into CVPixelBuffers as ...
user avatar
0 votes
0 answers
45 views

I'm drawing in a single CALayer between 100 and up to 1000 dots (colored circles actually) in a grid, when each dot state changes from hidden to shown and viceversa. So this layer is drawn quite a lot....
sbenitezb's user avatar
  • 535
0 votes
1 answer
57 views

I'd like to have a CALayer "float" over my scroll view's documentView. That is, it shouldn't move during scrolling. If I add a CALayer to my NSSCrollView's layer, the added layer is masked ...
jeanlain's user avatar
  • 475
0 votes
1 answer
235 views

I'm using a container for elements which I'd like for it to be blurred. In order to add rounded corners I modified the layer while for the shadow I created a second view named containerShadow and ...
Vulkan's user avatar
  • 1,086
0 votes
1 answer
112 views

I'm trying to draw lines with touches and then be able to move it. i didn't use UIContext method with draw(_ rect: CGRect) for drawing because i wasn't able to get size of stroke and some of it's ...
Ramesh Sanghar's user avatar
0 votes
1 answer
272 views

I want to check if CAShapeLayer is visible on screen or not. Does anybody now how to do?
shraddha11's user avatar
0 votes
0 answers
42 views

I have a view that has subviews alongside sublayers. myView var myView1 : UIView! var myLayer1: CALayer override final func viewWillLayoutSubviews() { super....
Gizmodo's user avatar
  • 3,024
0 votes
1 answer
205 views

Recently I've been playing around with shadows and one particular case got me really interested. Suppose I have a parent CALayer which has three oval-shaped sublayers laid in a stack. I applied shadow ...
Alexandr Chekel's user avatar
0 votes
1 answer
94 views

Can someone please guide how I can draw same size dotted line on UIView for all sides? I am using below code to draw line. let dashBorder = CAShapeLayer() let frameSize = self.frame.size let shapeRect ...
kb920's user avatar
  • 3,089

1
2 3 4 5
58