I'm writing an iPhone app, and I've got an image which I'ld like to have swirl outwards.
Currently my code looks like this (wrapped in a beginAnimations/commitAnimations block):
scale = CGAffineTransformScale(CGAffineTransformIdentity, 5.0f, 5.0f);
swirl = CGAffineTransformRotate(scale, M_PI);
[player setTransform:swirl];
[player s...
I'm working on an animated clock application for the iPhone, and I have to pivot all the 3 nodes in the view, which I have obtained in the following code:
[CATransaction begin];
[CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
clockarm.layer.anchorPoint = CGPointMake(0.0, 0.0);
[CATransaction commit];
[...
Hello all -
How can I use two separate CABasicAnimations to simultaneously animate the same property?
For example Two CABasicAnimations, both animate position.y.
The first animation will be a bounce (from 100, to 300, duration = 1, autoreverse = yes, repeatcount = 10)
The second animation will be a slow scroll (by 100, duration = 10)...
Is it possible to cancel a UIView animation while it is in progress? Or would I have to drop to the CA level?
i.e. I've done something like this (maybe setting an end animation action too):
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:duration];
[UIView setAnimationCurve: UIViewAnimationCurveLinear];
// other...
I'm looking to create a snowfall effect on the iPhone and I'm looking for advice as to how to best implement this. I've planned to use a png image as the sprite.
...
I'm trying to animate the drawing of a circle. Something the Shazaam app is doing while recording, but much simpler.
I've got this code in the drawRect: method to draw the circle:
CGContextRef currentContext = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(currentContext, 0.86, 0.86, 0.86, 1.0);
CGContextSetLineWidth(currentC...
I have several CALayers that I'm trying to animate to a new zPosition with each layer slightly delayed from the others.
Each animation should take 0.25 seconds and start 0.05 seconds after the previous animation started. At the end of each animation the layer will be removed from the layer tree.
I've successfully been using the -animat...
Is there a way to speed up animations using something like a blur?
I have a loop which must be travelled through to represent one "increment" in my UI. When the user jumps ahead by several increments at once, I'd like to speed up each of the animation loops.
How can I accomplish this?
...
Whats the difference between the two?
I'm sure they have pros and cons, and situations they are better performers in.
Any resources that compare the two?
Is one better for animation (I imagine the CATransform3D)? Why?
Also I think I read somewhere that text clarity can be an issue, is one better at scaling text?
...
How difficult would it be to use core animation to make an NSView slide in an out of view like a sheet? Generally speaking, what would be involved in accomplishing this? I've been reading through the CA documentation, but it's been hard for me to pinpoint which parts are relevant to what I want to do since I have no experience with the f...
I know Java pretty well. I know now most of the Basics in Objective-C.
I know nothing about Photoshop. I know how to use TurboCAD 10 Professional, so I do have some experience in 3D object modelling. Although not much.
What do I have to learn step-by-step, to come to 3D game Development for iPhone? What Tools do I need? Which Books help...
I want to display a progress indicator in a semi-transparent box that floats over a table view. In other words, when the table contents are being downloaded, I want an "Updating" label to appear over it.
I have seen this in several apps in the store, notably Facebook (when you shake to reload) and Darkslide.
My first impulse is to cre...
I'm aware of the fact that Core Animation dispatches its animations in a seperate thread, as stated in the documentation. Nevertheless, my animations seem to be blocking my main thread. All animations start and finnish. (With or without kCATransactionDisableActions set as true.) but become jumpy and the main runloop stalls.
What am I do...
I'm probably just missing something really simple but whenever I add CALayers after the view is visible they don't render. Here's the code I'm using:
[[imageLayers objectAtIndex:0] removeFromSuperlayer];
[imageLayers removeObjectAtIndex:0];
[[imageLayers objectAtIndex:0] removeFromSuperlayer];
[imageLayers removeObjectAtIndex:0];
first...
I did this in awakeFromNib:
drawLayer = [CALayer layer];
self.layer = drawLayer;
[self setWantsLayer:YES];
there is a "add:" action
// some business logic
[drawLayer addSublayer:layer];
[self layout];
-(void)layout
while(pg = [pageEnumr nextObject])
{
//rect is calculated so that layers are added in order (left to...
I have a layer backed view, I am trying to add subLayers roughly sized around 300 X 270 (in pixels ) to it,
its that the, sublayers count may reach upto the 1000 to 2000 in number and not to mention each of sublayer is again scalable to roughly 4280 X 1500 or more for starters.
So the problem is obviously that of a GPU constraint.
afte...
I can animate the addition of a UIView to my app, it looks very pretty so thank you apple.
However, how do I animate the removal of this view from the super view?
I'm using:
CATransition *animation = [CATransition animation];
[animation setDuration:1];
[animation setType:kCATransitionReveal];
[animation setTimingFunction:[CAMediaTimi...
What is considered best practice for animating view transitions on the iPhone?
For example, the ViewTransitions sample project from apple uses code like:
CATransition *applicationLoadViewIn = [CATransition animation];
[applicationLoadViewIn setDuration:1];
[applicationLoadViewIn setType:kCATransitionReveal];
[applicationLoadViewIn set...
I have 2 UIImageViews, IMG1 and IMG2 . Somesomes I want IMG1 to appear above IMG2 , and at other times I want IMG2 to appear above IMG1. How do I do this ?
...
Sorry if this is obvious or covered elsewhere, but i've been googling all day and haven't found a solution that actually worked.
My problem is as follows: I am currently drawing an image in a full screen UIView, for examples sake we'll say the image is in the bottom right corner of the UIView. I'd like to do a rotation transform(CGAffin...