CALayer « animation « iPhone iPad Media Q&A

Home
iPhone iPad Media Q&A
1.animation
2.audio
3.AVAudioPlayer
4.box2d
5.cocos2d
6.CoreGraphics
7.CorePlot
8.Flash
9.graphics
10.icon
11.image
12.photo
13.plot
14.sound
15.video
iPhone iPad Media Q&A » animation » CALayer 

1. How do I use CALayer with the iPhone?    stackoverflow.com

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" ...

2. Animation End Callback for CALayer?    stackoverflow.com

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 ...

3. How do you explicitly animate a CALayer's backgroundColor?    stackoverflow.com

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 ...

4. how do you copy an CALayer?    stackoverflow.com

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 ...

5. Displaying PDFs on iPhone - CALayers?    stackoverflow.com

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 ...

6. Observing animated property changes in a CALayer    stackoverflow.com

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 ...

7. Core Data + Core Animation/CALayer together?    stackoverflow.com

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 ...

8. Need help to make my iPhone animation work?    stackoverflow.com

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 ...

9. Disabling implicit animations in -[CALayer setNeedsDisplayInRect:]    stackoverflow.com

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 ...

10. Masking a CALayer - iPhone    stackoverflow.com

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 ...

11. Animating a custom property of CALayer subclass    stackoverflow.com

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" ...

12. What's the difference between CALayer -drawInContext: and -renderInContext:?    stackoverflow.com

What's the difference between CALayer -drawInContext: and -renderInContext: ?

13. Creating a custom animation with CGLayers?    stackoverflow.com

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 ...

14. Animating a CALayer's mask size change    stackoverflow.com

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 ...

15. Disable animation when moving CALayers    stackoverflow.com

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 ...

16. How to coordinate animation times on multiple CALayers?    stackoverflow.com

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 ...

17. iPhone - CALayer animating the Bounds    stackoverflow.com

Is it possible to animate the bounds of the CALayer on iPhone? How to implement that? Thanks!

18. CALayer valueForKey:    stackoverflow.com



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 ...

19. animating a custom CALayer property    stackoverflow.com



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 ...

20. What is a CALayer?    stackoverflow.com

What is a CALayer (as seen in the layer property on a UIView) and where would we use such a class?

21. How to add CIFilter to CALayer    stackoverflow.com

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 ...

22. How to forbid CALayers responding to a hit test?    stackoverflow.com

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 ...

23. How to prevent CALayer from implicit animations?    stackoverflow.com

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 ...

24. What am I missing from this implicit animation code for CALayer?    stackoverflow.com

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, ...

25. Why animating custom CALayer properties causes other properties to be nil during animation?    stackoverflow.com

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 %@, ...

26. iphone : animating a CALayer sublayer    stackoverflow.com

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 ...

27. Strange behaviour of CALayer    stackoverflow.com

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 ...

28. CAlayer perspective looks    stackoverflow.com

basically m looking for some guidance for CALayer perspective. I want to make a cube using CAlayers. is it possible??

29. How do I determine if a CALayer is fully covered by other CALayers?    stackoverflow.com

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 ...

30. How can I animated a CALayer object through Two CALayer objects    stackoverflow.com

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 ...

31. How do I stretch a CALayer while maintaining an integral origin?    stackoverflow.com

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 ...

32. How to check if CALayer exists    stackoverflow.com

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 ...

33. CALayer - backgroundColor flipped?    stackoverflow.com

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 ...

34. Core Animation - animation doesn't work    stackoverflow.com

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 ...

35. CALayer leaving trail after animation in iphone    stackoverflow.com

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, ...

36. Animate truncation of CATextLayer    stackoverflow.com

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 ...

37. iPhone CALayer Animation    stackoverflow.com

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 :

38. Anti-alias diagonal edges of CALayer    stackoverflow.com

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 ...

39. 3D Cube problem, Part 2    stackoverflow.com

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 ...

40. iOS Core Animation: CALayer bringSublayerToFront?    stackoverflow.com

How do I bring a CALayer sublayer to the front of all sublayers, analogous to -[UIView bringSubviewToFront]?

41. How to properly export CALayer on top of AVMutableComposition with AVAssetExportSession    stackoverflow.com

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 ...

42. CALayer: add a border only at one side    stackoverflow.com

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 ...

43. Animate a CALayer's bounds w/redraws    stackoverflow.com

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 ...

44. Two questions about CALayer    stackoverflow.com

  • 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 ...

45. How do I cut a notch out of a CALayer?    stackoverflow.com

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 ...

46. How can I store data in a CALayer?    stackoverflow.com

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 ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.