core-animation

UIView "suck" animation

I'd like to use the UIView "sucking" transition (view is "sucked" into a point) referenced here: http://iphonedevwiki.net/index.php/UIViewAnimationState#Using_suckEffect The method above, however, uses private APIs, which makes it next to useless for an App Store app. How can I recreate a similar effect without relying on private APIs?...

JavaScript: Achieving precise animation end values?

I'm currently trying to write my own JavaScript library. I'm in the middle of writing an animation callback, but I'm having trouble getting precise end values, especially when animation duration times are smaller. Right now, I'm only targeting positional animation (left, top, right, bottom). When my animations complete, they end up hav...

swapping views with cool page turn animation

Below is code that I'm using to swap views MySecondViewController *tempVC = [[MySecondViewController alloc] initWithNibName:@"MySecondView"]; [self presentModalViewController:tempVC animated:YES]; [tempVC passDataWithString:@"a string" andColor:yellowcolor]; How can I get the cool page turning animation (as with iBook or ROAD RAGE SIG...

Why doesn't this code work?

SignView *tempVC = [[SignView alloc] initWithNibName:@"SignView" bundle:Nil]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; [UIView setAnimationDelay:0.5f]; [UIView setAnimationDuration:2.0f]; [UIView commitAnimations]; [self presentModalViewCon...

How to perform kCATransitionPush animation without any transparency / fade effects

I'm trying to duplicate the "slide up from the bottom" animation that [UIViewController presentModalViewController:animated:] performs but without calling it because I don't want a modal view. The below core animation code comes very close but appears to be changing transparency values of the views during it. At the start of the animati...

shouldAutorotateToInterfaceOrientation and Animations

Hey guys, When I return NO from my shouldAutorotateToInterfaceOrientation: method in my view, my beginAnimations doesn't animate anymore! The code looks something like this: - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation { return (UIInterfaceOrientationIsPortrait(interfaceOrientation)); }...

Creating a Pop animation similar to the presentation of UIAlertView

I would like to present a view in the same manner as that of UIAlertView - a pop/spring. Unfortunately subclassing UIAlertView is not an option for the view I need to present. I have written some code, but I can't seem to get it as realistic as I would like. I would appreciate any suggestions for greater realism or a link if anything sim...

Learning using layers and CoreAnimation for iphone

Except for the official docs, what is a good resource for learning how to use CALayers and Core Animation efficiently/correctly? ...

iPhone - Jagged Edges when applying perspective to CALayer

I have a CALayer that I apply a perspective to using a CGTransform3D and specifying the m14 property. When the perspective is applied, the layer has jagged edges. I've heard people mention that adding a 1px transparent border around the layer will help with this. I don't know how to do that. I have tried using the border and borderWi...

Trigerring other animation after first ending Animation (Objetive-C)

Hi, I have a simple animation which simply modify the position of a button: [UIView beginAnimation:nil context:nil]; [UIView setAnimationsDuration:3.0]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; mybutton.frame = CGREctMake(20, 233, 280, 46); [UIView commitAnimations]; I want to perform some other animations when this...

CATransaction nesting problem

I have some strange problem with CATransactions nested: - (void) setXShift:(int)newShift; { [CATransaction begin]; [CATransaction setAnimationDuration_c:1]; //1 if(newShift > 0 && image.x < image2.x && image.x <= 0 && image.x > -image.w + 800) { [CATransaction begin]; [CATransaction s...

Core Animation question about swapping views

-(IBAction)buttonPressed1:(id)sender { SignView *tempVC = [[SignView alloc] initWithNibName:@"SignView" bundle:Nil]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; [UIView setAnimationDelay:0.0f]; [UIView setAnimationDuration:0.2f]; [self presentMod...

Implement looped movement animation with tap to cancel

Hi All; My app is based around a grid and an image that moves within a grid that is contained within a scrollview. I have an imageview that I am animating from one cell to another in time with a slow finger movement and recentering the scrollview. That is rather straight forward. I have also implement the ability to detect a swipe and ...

My Core Animation block isn't working like I'd expect

I have a UIView called activityView, which contains two subviews activityIndicator and cancelOperationsButton. These views are embedded in a XIB and wired up to my view controller. I have two methods that deal with activating (showing) and deactivating (hiding) these two subviews: - (void) enableActivityIndicator { [activityIndicat...

[sublayer array] insertSublayer:above: atomic if superLayer stays the same?

Setting: * two threads * one moves layers inside sublayer-array with insertSublayer:above: * the other accesses superlayer of the moved layer at the very same time Question: * is superlayer of the moved layer nil in any moment of insertSublayer:above: or below:? ...

iPhone animaion, how to flip a coin (2 UIImageview)?

Assume there are 2 UIImageview s, the front and back images of a coin. How to animate the 2 UIImageviews such that the face and the back is flipping (spinning) continuously? Thanks! ...

Can I perform animations on a UIControl subclass with iPhone SDK 3.x?

I have a custom UIControl that passes UIControlEventValueChanged events back to my ViewController. I also need to animate it (basic resizing) in certain circumstances, but UIControl seems to have no implementation of beginAnimations or commitAnimations. Do I have to encase it in a UIView? Any better solution? Thanks. ...

Printing CALayers

I have a NSView which contains many CALayers. When a user is editing a document, these CALayers animate all edits. I am attempting to implement printing for my app, but I am having some problems printing these CALayers correctly. Some CALayers bounds occupy the entire NSView, and do not need to be laid out, because their position never ...

Is there any way to improve UIView beginAnimations/commitAnimations performance?

I am resizing a control via [UIView beginAnimations] [self setTransform:CGAffineTransformMakeScale(0.5f, 0.5f)]; [UIView commitAnimations] The animation looks beautiful on the iPhone simulator but on my 2G test device it is unbearably slow and choppy. How can I improve the animation on an older iPhone? Or do I have to disable animat...

How is the presentation layer of a CALayer generated?

Hi, I'm having difficulties animating my custom layer property using Core Anmiation. My question is how the presentation of a CALayer is generated. Here is what I have now: @interface MyLayer : CALayer { NSMutableDictionary* customProperties; } @property (nonatomic, copy) NSMutableDictionary* customProperties; @e...