Tag: core animation

Bizarre unwanted animation occurring in iPhone app

I hate to post this but I am seeing unwanted animation in an iPhone app that I am working on. I have never seen this before in my apps or any other apps. This app is for iOS 4.2 and for iPhones only. The weirdness is happening even on an iPhone4. Examples: When the application […]

Stop and start an animation by touch. Objective C

I have made an animation that moves across the screen, my animation loops continuously. How can I stop the animation when you tap the animated image, Then let the animation continue when you lift the touch? I know how to use TouchesMoved to move a specified button like this: CGPoint point = [[[event allTouches] anyObject] […]

How to perform kCATransitionPush animation without any transparency / fade effects

Possible Duplicate: iPhone CATransition adds a fade to the start and end of any animation? 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 […]

Drawing particles

One part of my app shows a landscape, but it’s kinda boring as of now. Therefore, I’m planning to animate some particles over the screen (think of something like tiny wings – http://www.youtube.com/watch?v=DpmcX-rWGfs). However, i have not yet found any built-in particle system; How can i do this memory-efficiently? I’ve already implemented my own animation […]

Why does a CAShapeLayer's stroke extend out of the frame?

Here’s sample code: //Called by VC: HICircleView *circleView = [[HICircleView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; // init of circle view – (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { CAShapeLayer *borderLayer = [CAShapeLayer layer]; borderLayer.fillColor = [UIColor whiteColor].CGColor; borderLayer.path = [UIBezierPath bezierPathWithOvalInRect:self.frame].CGPath; borderLayer.strokeColor = [[UIColor redColor] CGColor]; borderLayer.lineWidth = 5; [self.layer addSublayer:borderLayer]; } return […]

Core Animation window flip effect

Any tutorials or sample code to get the Core Animation window flip effect? I’m using Flipr right now, which uses Core Image to generate the effect but CoreAnimation is much smoother Thanks

animations on infinite loop

I have 5 different animations that animate then disappear one after another. Is there a way to put them on an infinite loop so animation #1 begins and ends, then anim #2 begins and ends etc..? the whole process then would repeat on an infinite loop. I have the animations in separate blocks on delays. […]

iOS Touch, Gestures, Animation

I am exploring iOS4.3 SDK & wanted to implement a particular animation effect. But have no idea how to do it. It goes like this – I have a square box on the screen & upon user putting his finger on the box & dragging his finger the box should follow him. It’s easy till […]

Animation CAShapeLayer

I draw a graph with this code: CAShapeLayer *curentGraph = [CAShapeLayer new]; CGMutablePathRef linePath = CGPathCreateMutable(); curentGraph.lineWidth = 3.0f; curentGraph.fillColor = [[UIColor clearColor] CGColor]; curentGraph.strokeColor = [colorGraph CGColor]; for (NSValue *value in arrOfPoints) { CGPoint pt = [value CGPointValue]; CGPathAddLineToPoint(linePath, NULL, pt.x,pt.y); }; curentGraph.path = linePath;CGPathRelease(linePath); [self.layer addSublayer:curentGraph]; and it looks like this But I […]

Subviews layer transform and layoutSubviews

my question is related to UIView/CALayer: Transform triggers layoutSubviews in superview Where is reported that, from a TSI reply from apple: Generally, changing a geometric property of a view (or layer) will trigger a cascade of layout invalidations up the view hierarchy because parent views may have Auto Layout constraints involving the modified child. Note […]