Currently, I have a UIView subclass that "stamps" a single 2px by 2px CGLayerRef across the screen, up to 160 x 240 times.
I currently animate this by moving the UIView "up" ... |
I'm wondering where the callbacks are (or if there are anything) for animations in a CALayer. Specifically, for implied animations like altering the frame, position, etc. In a UIView, you could ... |
I'm trying to construct a CABasicAnimation to animate the backgroundColor property of a Core Animation CALayer, but I can't figure out how to properly wrap a CGColorRef value to pass to ... |
How to you make an NSArray full of multiple instances of a CALayer (all with the same frame, contents etc)?
Background: CALayer takes a bit of overhead to create, so I would ... |
I'm having a huge headache trying to figure this out. I'm trying to display a single page from a pdf file (the only one that is). This pdf page is a ... |
I have a CABasicAnimation that animating a property of a CALayer e.g. bounds.origin. I want to be able to observe the property changing over time, but haven't really found a method ... |
I am making an Cocoa app with custom interfaces. So far I have implemented one version of the app using CALayer doing the rendering, which has been great given the hierarchical ... |
|
I'm brand new in iPhone animation feature. I wrote a simple testing program to spin a red rectangle; however, the animation doesn't act at all. What's wrong with my code? Thanks ... |
I've got a layer with some complex drawing code in its -drawInContext: method. I'm trying to minimize the amount of drawing I need to do, so I'm using -setNeedsDisplayInRect: to update ... |
I'm creating a custom on / off toggle switch for the iPhone (similar to the standard switch) and i'm at the point where I'm setting the mask of the slider, but ... |
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 "animatable" ... |
What's the difference between CALayer -drawInContext: and -renderInContext: ?
|
Basically, I want to animate a shrinking circle. I've already done this by drawing progressively smaller circles onto CGLayer's, and then using
if(index < 30){
[self performSelector:@selector(showNextLayer) withObject:nil afterDelay:(NSTimeInterval)0.02];
index++;
}
in my showNextLayer ... |
I have a UIView subclass which uses a CAShapeLayer mask on its CALayer. The mask uses a distinct shape, with three rounded corners and a cut out rectangle in the remaining ... |
The following code animates the movement, even though I didn't use beginAnimations:context. How do I get it to move without animating? This is a new iphone view project, and these ... |
Hi I have two CALayers (*layer1 and *layer2). What I want is to start the animation on layer2 when 50% of the layer1's animation time has elapsed. How can I achieve ... |
Is it possible to animate the bounds of the CALayer on iPhone? How to implement that? Thanks!
|
How different is the behavior of CALayer's valueForKey from that of any other ordinary NSObject's?
I have a custom layer which inherits from CALayer, and that has a property named 'angle',
but [myLayer ...
|
I'm trying to define an abstract layer property, angle, based on the existing layer property position. Basically it describes the orientation of the layer from the center of a circle. I ...
|
What is a CALayer (as seen in the layer property on a UIView) and where would we use such a class?
|
I am new to core animation , i add some layers to my view and add image to it.
Now i want to give blur effect to my layer
But i don't ... |
I'm doing some layer drawing on the iPad and have to provide user interaction. My layer hierarchy is quite complex and deep, I'm drawing some kind of a tree with several ... |
When I set the backgroundColor property of an CALayer instance, the change seems to be slightly animated. But I don't want that in my case. How can I set the backgroundColor ... |
I am trying to get the following code from a book to work. It animates the layer of a UIImageView called the Chicken :
[CATransaction setValue:kCAMediaTimingFunctionEaseInEaseOut forKey:kCATransactionAnimationTimingFunction];
[CATransaction setValue:[NSNumber numberWithFloat:1.0] forKey:kCATransactionAnimationDuration];
theChicken.position = CGPointMake(225, ...
|
I have a custom CALayer (say CircleLayer), containing custom properties (radius and tint). The layer renders itself in its drawInContext: method.
- (void)drawInContext:(CGContextRef)ctx {
NSLog(@"Drawing layer, tint is %@, ...
|
I'm trying to animate the sublayer of a UIView's layer with the following code:
CALayer *sublayer = [[CALayer alloc] init];
[sublayer setFrame:myRect]; // myRect is a portion of the view's frame rectangle
[self.layer addSublayer:sublayer];
and ... |
Iv animated a CALayer to move along a curve. Once the animation is done i hide the layer in the animationDidStop delegate. Say i set the layer's frame.origin to be at ... |
basically m looking for some guidance for CALayer perspective.
I want to make a cube using CAlayers. is it possible??
|
I have a series of layers that are randomly placed on the screen. As each layer is added, it is positioned on top of all of the others.
Eventually, a layer ... |
I have three CALayers.
layer3 is a moving object. 25x25
Will say layer1 & 2 both are about 150x150.
layer1 could be at any given point on the screen. Will say layer1 is at ... |
I'm trying to stretch a UIView that I have by applying a CATransform3DMakeScale to it:
CATransform3DMakeScale(0.9, 1.0 - (0.1 * (path.row - midPath.row)), 1)
Problem with this is two fold: it leaves me ... |
I have a CALayer which animates (moves) off-screen on the y axis.
After it's off-screen i'm doing a [myLayer removeFromSuperLayer] so its gone from the view and does not go back to ... |
I'm creating a CALayer like this:
UIColor *color = [UIColor colorWithPatternImage:[UIImage imageNamed:@"MyPattern.png"]];
backgroundLayer = [[CALayer alloc] init];
[backgroundLayer setBackgroundColor:[color CGColor]];
[[self layer] addSublayer:backgroundLayer];
For some reason, the pattern is drawn upside down. I've already tried setting ... |
I'm attempting to use this code to animate a CALayer's background color:
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"backgroundColor"];
animation.duration = 0.3;
animation.fromValue = (id)[backgroundLayer backgroundColor];
animation.toValue = (id)[[UIColor redColor] CGColor];
[backgroundLayer addAnimation:animation forKey:@"animateBackgroundColor"];
For some reason, this doesn't ... |
I am working on analog clock app in iphone.I have used CALayer for moving the clock hands which are images. While moving to the settings page from the clock view controller, ... |
I have a CALayer with a CATextLayer sublayer. When I apply a transform or otherwise resize the CALayer, I need the CATextLayer to resize within its parent's bounds. Upon resize, the ... |
I'm a beginner and I trying continue to familiarize myself with CALayer ...
Thanks again @Alexsander Akers, @DHamrick and @Tommy because now I can skew my CALayer !
It look like :
![]() |
When I set the transform property of my CALayer with a CATransform3DRotate, the layer is properly rotated. However, the edges of the layer are jagged and not anti-aliased. I've read a ... |
This is my 2nd Question on 3D cubes in iphone using CALayer, Core Animation framework, written in Objective-c. For my first question please visit here 3D Cube Problem! Part 1.
I ... |
How do I bring a CALayer sublayer to the front of all sublayers, analogous to -[UIView bringSubviewToFront]?
|
I know this question was asked before (for example here and here) but I just can't figure out what I'm doing wrong.
I have an AVMutableComposition that I use to ... |
I can add a border to a CALayer in this way:
[webView.layer setBorderColor: [[UIColor colorWithRed:0.6 green:0.7 blue:0.2 alpha:1] CGColor]];
[webView.layer setBorderWidth: 2.75];
But is it possible to add a border only ... |
I am wondering how one might animate a CALayer's bounds so, on each bounds change, the layer calls drawInContext:. I've tried the 2 following methods on my CALayer subclass:
- Setting
needsDisplayOnBoundsChange ... |
- with
[myLayer setName:@"layer_1"] I set the name of a layer. But how can I get it from another method? Is there something like [self.view.layer.sublayers getLayerByName:@"layer_1"]?
- how to animate a
CALayer to move ... |
I have a set of views in a carousel, each using a CAGradientLayer as a background. The carousel sits over a textured background. I've been asked for the background ... |
I am creating a grid of CALayers, is there a way I can set a tag or something so that I can identify it if I need to?
I can probably just ... |