core-animation

Making a UIView "disappear" behind another tabbar

I'm using the following code to make a small view disappear at the bottom of the screen: int y_dest = self.application.windows.frame.size.height; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.33f]; [UIView setAnimationDelegate:self]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@sele...

How to get the "dashboard" ripple-effect and closing-effect for UIViews?

My project add a UIView with a button press. Is it possible to get the dashboard ripple-effect when the subview is added to the view? Also the subview can be closed with: removeFromSuperview. How can I get the closing effect of a dashboard widget (when you press on the x). ...

Why are my animation values ignored?

I try to do a CAKeyFrameAnimation for rotating an layer: CALayer* theLayer = myView.layer; CAKeyframeAnimation* animation; animation = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation.z"]; animation.duration = 1.0; animation.cumulative = NO; animation.repeatCount = 1; animation.removedOnCompletion ...

What kind of value is keyTime in an CAKeyFrameAnimation?

For example I have this CAKeyFrameAnimation: CALayer* theLayer = myView.layer; CAKeyframeAnimation* animation; animation = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation.z"]; animation.duration = 1.6; //animation.cumulative = YES; animation.repeatCount = 1; animation.removedOnCompletion = NO; ...

How to keep on rotating a view with a CAKeyFrameAnimation?

I try to do this: There is an view which has been rotated already to some value, lets say 15 degrees. Imagine a view rotated by 15 degrees. Next, I only know, that I want this view to rotate from it's current rotation to 40 degrees. Imagine how that view now rotates from 15 to 40 degrees. For practice, I want to do that with CAKeyFr...

Ugly scaling effect when rotating a view with Core Animation

Did anyone else encounter this problem? I have a 300 x 300 pixel view. When I rotate this with core animation, the view not only rotates but also "pulses" in and out with a scaling effect. Hard to describe. But it's very, very ugly. Trust me. The "scale pulse" happens occasionally, but especially when the animated rotation delta is not...

iPhone: How to Rotate a UIImageview Left or Right?

Hello all, I want to rotate an UIImageView in the following manner: If I hold the imageview and move the finger to left, then the imageview should rotate to the right (and vice-versa.) Here is the link Balance ...

Why does one have to use CALayer's presentationLayer for hit-testing?

I was working on a Cocoa Touch application, and trying to handle touches by determining which sublayer of a view's layer was touched. My controller's code looked like this: CALayer *hitLayer = [self.view.layer hitTest:point]; This wasn't working. It would work if I tapped at the bottoms of sublayers, but not at the tops. After an hour...

Movie time from QTVisualContext given CVTimeStamp in CAOpenGLLayer rendering method?

I'm using the standard CoreVideo Display Link + QTVisualContext to render a QuickTime movie into an NSOpenGLView subclass. I would now like to synchronize a timeline view with movie playback. The timeline view is implemented as a layer hosting view, hosting a CAOpenGLLayer subclass that renders the timeline. I chose this architecture bec...

iPhone UITabBarController

I am using a UITabBarController with 3 items and am curious how to access a method from the first tab if I am on the second or third tab. The problem I am running into is I have a UIImageView on the first tab that is using core animation to loop continuously through 3 images. But when I switch to the second tab and try to switch back to ...

Where am I leaking CGMutablePathRef in this code?

In my code I have CGMutablePathRef thePath = CGPathCreateMutable(); If I don't release it I literally get thousands of leaks because I'm doing the action constantly. However, if I do release it, my game eventually crashes. Any ideas? Is it possible I'm releasing it in the wrong place? -(void)MoveObject:(int)Tag { representatio...

Math for core animation?

What is a good level of math required for, like, advanced core animation? Take this for example: http://cocoadex.com/2008/01/lemur-math.html And what's a good book/resource to learn it? -Jason ...

smooth pendular animation with Core Animation Framework

Hi Guys, im trying to do an animation with an uiimageview. in this view is an image with an arrow, that i want to rotate about 45 degrees back and forward very smoothly like an pendular or an old clock. something like this, just smooth and with my image: http://bit.ly/cArvNw (found this with google ;) ) my current setup looks like thi...

Can Scrolling control an Animation ?

Hi, I have a UILabel that displays the current date for the current view of my scroll view. When I scroll this view to the left (to the left pages), I'd like this label to change to the day before, with a crossing effect between the 2 dates. I take as reference the fading effect of the Springboard when you scroll to the Spotlight page....

CAShapeLayer path dissapears after animation - need it to stay in the same place

Thanks to some help on StackOverflow, I am currently animating a path in CAShapeLayer to make a triangle that points from a moving sprite to another moving point on the screen. Once the animation completes, the triangle disappears from the screen. I am using very short durations because this code is being fired every .1 of second for ea...

Disabling implicit animations in -[CALayer setNeedsDisplayInRect:]

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 just the changed parts. This is working splendidly. However, when the graphics system updates my layer, it's transitioning from the old to the new image u...

Flip between Image 1, 2, 3 instead of Image 1,3 (iPhone SDK)

I'm using some pretty standard code to flip 2 UIImageViews that are inside a small view. (I'm amazed it worked!) But what if I had THREE UIImageViews inside a small view... and wanted to flip between all 3? I thought I could just cut/paste 2 copies of my code... but I guess not. When I try to flip 1>2.. and then 2>3... it just flips on...

CAKeyframeAnimation with loop

I'm trying to create a CAKeyframeAnimation with a little twist. I want part of the keyframe animation to loop for a while before going straight to the end. For example: Intro: play keyframes 0 to 10 Loop: play keyframes 11 to 15 (repeat for a while) End: play keyframes 16 to 20 CAKeyframeAnimation doesn't seem to provide enough f...

How to rotate UIImageView in 3d circular way?

Hello, I m new to core animation i want to rotate an imageview left or right but i want it to be rotated in z axis so it can looks like a circular rotation.Here is an image for more explanation i want to rotate the image the inner imageview these are two imageview's. i have tried this code please someone apply this and correct the co...

Animate setContent of an NSWindow

Hi there. In the past I've been successfully able to fade in an NSWindow using the following code; if (![statusWindow isVisible]) { statusWindow.alphaValue = 0.0; [statusWindow.animator setAlphaValue:1.0]; } CAAnimation *anim = [CABasicAnimation animation]; [anim setDelegate:self]; [statusWindow setAnimations:[NSDictionary dic...