calayer Questions

8

Solved

I have a custom view which is a subclass of UIView. I added some sublayers to the custom view but now I want remove them. I tried doing this: self.layer.sublayers = nil; But this will remove e...
Soneson asked 2/6, 2016 at 3:5

5

I want to capture a view with its subviews. I'm using this code to capture the screen: let view = self.faceTrackerContainerView UIGraphicsBeginImageContext(CGSizeMake(view.bounds.size.width, view...
Ardra asked 22/10, 2016 at 3:50

3

Solved

I have a CALayer subclass, MyLayer, that has a NSInteger property called myInt. I'd really like to animate this property via CABasicAnimation, but it seems CABasicAnimation only works on so-called ...
Wellbeloved asked 7/3, 2010 at 6:12

2

Solved

How can I animate a color change of UILabel using swift? I have seen people mention using CALayer but I cannot figure out the Swift syntax. This is an example of Objective-C CALayer *layer = myVi...
Krishnakrishnah asked 5/12, 2014 at 18:6

6

Solved

So I am doing some custom animations on my navigationcontroller and the way it pushes and pops the viewControllers. Everything runs smooth. As soon as I add the following code (In a subclass of UI...
Diagnose asked 3/4, 2012 at 17:2

4

Solved

Hi i like to add an CALayer Shadow to an View where the shadow was left and right of the view the simplest way was: someView.layer.shadowColor = [[UIColor blackColor] CGColor]; someView.layer.shad...
Canaanite asked 8/1, 2013 at 16:19

4

At first sight my question looks really simple, but it seems that I really can't find solution. Here is what it is: I want to calculate the bounding box of a CATextLayer's string. Here is what I do...
Leeuwenhoek asked 2/3, 2012 at 18:30

4

Solved

I'm looking to perform a perspective transform on a UIView (such as seen in coverflow) Does anyonew know if this is possible? I've investigated using CALayer and have run through all the pragmat...
Durbar asked 7/12, 2008 at 16:4

4

Solved

I am aware that a CALayer's shadowPath is only animatable using explicit animations, however I still cannot get this to work. I suspect that I am not passing the toValue properly - as I understand ...
Swashbuckling asked 7/5, 2011 at 23:39

9

My application has a UIScrollView with one subview. The subview is an extended UIView which prints a PDF page to itself using layers in the drawLayer event. Zooming using the built in pinching wor...
Navar asked 5/3, 2010 at 2:22

4

Changing the colours is pretty straightforward, but is it possible to change the border of all unselected dots? Ex: dot.layer.borderWidth = 0.5 dot.layer.borderColor = UIColor.blackColor()
Katy asked 26/2, 2016 at 11:47

4

Solved

I am applying shadow to a UITableViewCell using CALayer. Here's my code: - (void)addShadowToView:(UIView *)view { // shadow view.layer.shadowColor = [[UIColor colorWithWhite:0.0f alpha:0.1f] CG...
Multipurpose asked 27/7, 2016 at 21:53

4

Solved

I need to show a tint colored image in CALayer. It works for UIImageView: imageView.image = image.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate) But CALayer shows the image with it...
Hom asked 17/11, 2014 at 22: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

7

Solved

I must add a UIImageView as subview of MapView. To do this I created a layer above the MapView. In this layer I want to put my image, but I get a white rectangle and nothing else. My image is not v...
Trueblood asked 7/11, 2012 at 15:12

6

Solved

I have a UIImageView and I wanted to add a black overlay on top of it. What is the best way of doing this without having to override drawRect? I was thinking of adding a CALayer on top of it. But u...
Waki asked 27/6, 2012 at 0:6

4

I have a UITableView that I am attempting to expand and collapse using its beginUpdates and endUpdates methods and have a drop shadow displayed as that's happening. In my custom UITableViewCell, I ...
Pablo asked 12/5, 2017 at 18:8

2

Solved

I am trying to draw a string in the overriden draw method of CALayer (I'm programming for iOS). override func draw(in ctx: CGContext) { let font = UIFont.systemFont(ofSize: 30) let string = NSAt...
Faculty asked 18/10, 2018 at 11:58

4

I have an App in which I use AVPlayerLayer (used within a subclass of UIView just like Apples AV Foundation Programming Guide). Ihave a couple of view controllers witch are held in the View Control...
Obrien asked 12/2, 2014 at 18:52

4

Solved

I'm trying to learn how to use and implement CALayer in a Mac Objective-C application, but I can't seem to probably do the most basic thing - add a new layer and set its background colour/frame siz...
Teresiateresina asked 4/3, 2012 at 3:10

7

Solved

How can I get 'AVCaptureVideoPreviewLayer' to display properly in landscape orientation? It works fine in portrait but doesn't rotate, and shows a rotated camera capture when the parent view contro...
Antilepton asked 21/1, 2014 at 12:37

8

Hi I am developing iPhone application in which I tried to set one side border for edittext. I did this in following way: int borderWidth = 1; CALayer *leftBorder = [CALayer layer]; leftBorder.bo...
Ryder asked 19/6, 2014 at 9:30

8

Solved

In an animation I added a lot of sublayers to a view, with: [self.view.layer addSublayer:layer1]; [self.view.layer addSublayer:layer2]; .... I would like to remove all sublayers with an action....
Joyjoya asked 28/5, 2012 at 19:48

2

Solved

I am developing a book app where users can change the font size on the TextView. when users change the font size, the app save the current text position not to change that after users did changing...
Acoustic asked 7/4, 2013 at 15:26

1

Solved

I have a rounded UIView and I have added a dashed line stroke to it. ,,, var view = CAShapeLayer() view.strokeColor = UIColor.red.cgColor view.lineDashPattern = [2, 2] view.frame = addphotoVie...
Unconditional asked 17/6, 2020 at 17:19

© 2022 - 2024 — McMap. All rights reserved.