core-animation

How do I create a custom page curl Core Animation?

Hi! I'm trying to create a "page curl" animation of an image in my iPhone application. I t UIViewAnimationTransitionCurlUp, and it's undocumented Core Animation siblings, however the image I need to animate is a transparent PNG, with "uneven" (some alpha pixels) outlines. When using the aforementioned pre-made transition, those alpha pi...

how to create something like For All Seasons app in opengl?

I have seen a free app named For All Seasons. It has very cool effects. Does someone know how we can achieve this using OpenGL or Core Graphics? ...

Will OpenGL give me any FPS improvement over CoreAnimation for scrolling a large image?

Hi, I'm considering re-writing the menu system of my iPhone app to use Open GL just to improve the smoothness of scrolling a big image (480x1900px) across the screen. I'm looking at doing this as a way to improve on using the method/solution as described here (http://stackoverflow.com/questions/1443140/smoother-uiview). This solution wa...

Formatting multi-line text on the iPhone

Hey guys, I need to display some text on multiple views loaded on a UIScrollView. It should be centered both vertically and horizontally. I did accomplish this with no problems using a UITextView, but now I need to perform a little bit of formatting in the middle of the text - some color changing and italics. My first try was to use a...

Can the size of a stretchable button image be animated in Cocoa Touch?

I'm creating a UIButton with a stretchableImageWithLeftCapWidth:topCapHeight: I would like to change it's size smoothly with Core Animation like so: float shrinkFactor = 0.2; NSTimeInterval slowSpeed = 5.0; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:slowSpeed]; UIButton *thisButton = (UIButton *)[self.view...

How to crossfade between 2 images on iPhone using Core Animation

I'm doing this to learn how to work with Core Animation animatable properties on iPhone (not to learn how to crossfade images, per se). Reading similar questions on SO leads me to believe it can be done by animating the .contents property of the UIImageView's layer like so: UIImage *image1 = [UIImage imageNamed:@"someImage1.png"]; UIIm...

Observing animated property changes in a CALayer

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 that works 100%. I tried using KVO (key-value observation) on the presentationLayer's bounds.origin keyPath. The system complains that the object is freed b...

How do you animate the resizing of a tableView without its rows/subviews getting clipped?

EDIT: I originally asked this question in regards to general view resizing, but I realize now that it's something much more specific to tableViews. Say that a tableView originally has a frame of (0 0, 320 460), i.e., it fills an entire iPhone screen. In order to resize the tableView's height and animate the resize, I map the following ...

how to stop core animation?

i am animating a button using core animation now on a certain condition i want to stop that animation how do i stop the animation? here is the method to animate the button -(void)animateButton:(UIButton *)btnName { CABasicAnimation *pulseAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; pulseAnimation.duration = ....

is Open GL a Overkill for a 2d Card Game ?

Hi, I was just have an idea of creating a card game and I was just thinking whether to use OpenGl or CoreAnimation.Can you please tell me whether it would be a bit of a overkill to use OpenGL for s 2D card game.Thanks :) ...

Fast, 2 Dimensional Table View

I'm implementing a view for displaying tabular information with 2 axis, but I'm starting to run into performance issues with rendering all the cells. The view looks something like this: +------------+-------------+------------+------------+------------+ | | 12.00am | 1.00am | 2.00am | 3.00am | +------------+-...

Core Animation performance on iphone

I'm trying to do some animations using Core Animation on the iphone. I'm using CABasicAnimation on CALayer. It's a straight forward animation from a random place at the top of the screen to the bottom of the screen at random speed, I have 30 elements that doing the same animation continuously until another action happens. But the perform...

Animate grass with CoreAnimation (on the iPhone)

Hello, how could I animate blades of grass, which are waving in the wind? I haven't found any suitable CoreAnimation combinations. Regards, Stefan ...

Any examples of creating a dial?

I'd like to create a dial with similar behavior to some of the retro phone apps. These have a circular dialer that lets you spin it around with your finger. Any ideas how that is created or some links that discuss aspects of it? ...

Need help understanding "kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid Region"

While running my application (which does a good bit of custom drawing) I get this error (it happens a good bit with no observable side effects, but I'd like to understand what's happening). <Error>: kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch ...

Rotation always start from original position.

I am trying to implement a wheel type functionality. I calculate the center point of the view and find the angle created on moving in touchesMoved: method. For the first move it rotated by some degree. But for next move it comes back to the original position of the view and then rotating.Actually i want the rotation from the end point of...

Animate the change of a stroke color on UIView

I'd like to "pulse" the stroke color on a path that I've drawn in a UIView's drawRect. But not sure this is possible? - (void)highlightView { if (!isHighlighted) { [UIView beginAnimations:NULL context:nil]; [UIView setAnimationDuration:0.75]; self.strokeColor = kHighlightColor; self.strokeWidth = 2.0; [UIVi...

Do Operation Queues help out when Core Animation strikes to animate?

Core Animation uses Background Threads. When performing heavy calculations on the main thread, CA stops animating due to its low priority threads. How could Operation Queues help out in such an situation? ...

CoreAnimation doesn't work with -setAlphaValue on QTMovieView

Hello I have some basic code for adding a QTMovieView. I want it to fade in, so I add an animation on setAlphaValue. Only issue is that it doesn't work. The alpha value is instantly set to whatever it was supposed to animate to. If I try animating e.g. setFrame: it works fine. You'll find my code below. This is on 10.5.7 with the Mac OS...

Shake visual effect on iPhone (NOT shaking the device)

On login failure, I'd prefer to avoid showing an alert, it's too fleeting. Showing the alert and then showing the text somewhere on the login screen seems like duplication. So I'd like for it to graphically shake my login view when the user enters the wrong user ID and password like the Mac login screen does. Anyone know if there's a w...