core-animation

Rotating a CALayer 90 degrees?

How do I rotate a CALayer 90 degrees? I need to rotate everything include sublayers and the coordinate system. ...

How to do image packing for image sequence core animation?

In my iPhone app, I have about 100 full screen images for image sequence core animation. The reason that I use such a large image sequence animation is that video playback is not flexible and powerful enough in SDK 3.0. My images are not fully covered. For OpenGL, we can pack the valid content of several images into one large and power-...

Core Animation delegate not called

I must be doing something wrong obviously. My delegate doesn't get called when I set the frame of a view. Frame version NOT working -(void)someMethod { CAAnimation *anim = [CABasicAnimation animation]; [anim setDelegate:self]; [[currentViewController view] setAnimations:[NSDictionary dictionaryWithObject:anim forKey:@"frame...

Stop animation at current image

hi, I have an image that is animating, until you press the button that says "Stop". The code works and all, but the image returns to the first image in the array. How can i add a code to tell it to stop at the image it's currently at? - (void)viewDidLoad { [super viewDidLoad]; imageView.animationImages = [NSArray arrayWithObj...

Scrolling RSS reader iPhone View

I'm planning on adding a small subview to the bottom of my current app so that it can display RSS feed headlines one at a time. What would be the best type of view to use for this? UITextView, UIWebView? Perhaps a custom UITableViewCell? If i use a UITextView and tap it, it displays the keyboard, but if i setUserInteractionEnabled to NO ...

Unset a UIView's animation transition

I use the following code to animate a flip transition on a view: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1.0]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES]; [self.view addSubview:anotherViewController.view]; [UIView commitAnimations]; However, when I...

Is it possible to animate the width of a UIButton of UIButtonStyleCustom type?

I have an animation on frame size which works fine when the UIButton is a UIButtonTypeRoundedRect. But has no visible affect when I am using a UIButtonStyleCustom with background image. My animation code is here: [UIView beginAnimations:@"MyAnimation" context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAni...

How to replicate the Scale Up Animation when an app starts regularly (push app icon on HomeScreen) on an iPhone

Hi, i want to replicate the animation when an app starts on iPhone. There is the first view scaling up from 50 % to 100% i think. later I want to use this as a transition between 2 views. Any ideas how to replicate, or is there a ready to use solution from apple in the sdk? Thank you very much :) ...

Is Cocoa animator proxy unable to handle 0.5 points?

I'm trying to move the origin of a custom view. If I directly set the new origin for the frame, everything is working fine as expected. [MyView setFrameOrigin:NSMakePoint(0.5, 0.5)]; If I try to animate the movement with the proxy animator. [[MyView animator] setFrameOrigin:NSMakePoint(0.5, 0.5)]; The new origin will be (1, 1) inst...

Right tool for the job: CoreAnimation, Cocoa Animation, or OpenGL ES?

I am relatively new to doing graphics work on the iPhone and was hoping to get some guidance on which technology I should employ. The issue I am facing is that I need to create an iPhone app that will have a spinning wheel in it, think the Price Is Right wheel. I am not looking for anyone to provide a detailed solution, that would spoi...

Block-based UIView animation goes into turbo when view is not visible

I'm using the new block-oriented UIView animation methods to create a sliding-and-fading slideshow inspired by the one that shows up on the home screen of the Flickr application. It's all working very nicely, and I'm no longer intimidated by blocks. Where I'm using this is on a page of my app that's inside UINavigationController control...

CARenderer never produces output

Hi, I've been stuck for hours trying to render a Core Animation layer tree into an OpenGL context using CARenderer. The OpenGL context is currently provided by a NSOpenGLView subclass set up in Interface Builder, with settings on default. Here's how I set up the CALayers in my example: l1 = [[CALayer layer] retain]; // l1 is an...

Animating UILabel Fade In/Out

I am going to end up with an array of RSS feeds, and would like a label or some such to display them at the bottom of the view. I would like to animate through each feed in the array. This is what i have so far to animate, which, works for the fade, but only animates the last item of the array. feed = [[UILabel alloc] initWithFrame:CGR...

CABasicAnimation not started when adding animation to a layer that is not visible

Hi Stackoverflow, I'm trying to create a little glow-animation with Core Animation. Animation works fine so far. Problem is, the animation is used in a table cell. When the animation is added to a layer that is currently in a cell that is not yet visible (without scrolling), the animation is not started somehow? Seems as if CoreAnimatio...

CALayers not showing when drawn the first time

I've been struggling with a strange problem which has arisen in using the CorePlot framework, but which I suspect isn't an error in the framework itself. I'm hoping somebody here will have seen something similar, and can point me in a productive direction. I have a tabbed view in which graphs are shown. The tab that is initially activ...

Elastic Animation - the math behind it

I want to make an elastic popup animation (in the iphone google maps app, kind of like the popup) Does anybody have an idea of what the math formula would look like to make an elastic animation? i tried but couldn't think of formula or how to do that. Here's whats i had in mind: (a control, or something) starts growing, faster,faster, ...

How can I stop CALayers from animating?

Hi all, I've created a bunch of sublayers within my view, populating each one with a graphic, so effectively they are sprites. However, when I call [lineLayer setValue:[NSNumber numberWithFloat:0.5] forKeyPath:@"transform.scale"] it appears to 'tween' to that size instead of just appearing at the new scale. Is there any way of switchin...

Stockapp kind of interaction - UIView x CALayer

I'm implementing some charts with some user interactions, like long-pressing to view the full data under the finger, two fingers to draw a line, and other stuff. For a start, how would I implement the kind of interaction the iphone stocks app does in the landscape mode of the price chart? Manipulate a CALayer for the yellow vertical li...

Force clockwise/anticlockwise rotation for a CABasicAnimation of a UIImageView

I'm animating a pendulum which swings from 0 degrees to max 200 degrees and then back again. The problem is that if the pendulum goes over 180 degrees, it returns to 0 by the shortest route which is to continue clockwise. And I'd like it to go anticlockwise. Here's my code: ('right' is a boolean which is TRUE when the pendulum is swingin...

Using UIPanGestureRecognizer and CATransform3DScale to enlarge dragged element

I want to implement a delayed 'enlarging' animation on an UIView that is being dragged using an attached UIPanGestureRecognizer. I've been using something similar to the following code: UIView* innerView; CGPoint startingPoint; - (void)viewDidLoad { innerView = [[[UIView alloc] autorelease] initWithFrame:CGRectMake(0, 0, 200, ...