Animating UINavigationBar
I want to slide the right button and the title in and out (instead of having things just appear and disappear). How can I go about doing this? ...
I want to slide the right button and the title in and out (instead of having things just appear and disappear). How can I go about doing this? ...
Hi, With the following code I'm able to rotate the layer based on the left side. But how can I rotate it based on the right side? Thank you, Jose. CALayer *layer = [masterTasksLeftSideView layer]; [layer removeAllAnimations]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.y"]; CATrans...
I'm using CATiledLayer to render a heavy pdf page inside a UIScrollView that is used to handle zooming and spanning.. The method below is called every time a Tile need to be drawn and I regret that I have to paint the whole pdf every time. I hope that behind the scene the CATiledLayer only render the part that it needs but nothing is l...
I have two animations in a custom UIView, anim1 and anim2. Anim1 sets its delegate to self and there is an animationDidStop method in my class which triggers Anim2. If I want something else to occur when Anim2 finishes, how do I do this? Can I specify a delegate method with a different name? UPDATE I declare two animations as iVars: C...
I'm doing a sort of kiosk app with a number of buttons that swap out the subviews in a window. There are about a half dozen subviews, all of which are NSViews. One of the subviews has in it a PDFView displaying a local PDF file. Without any core animation, everything works as expected. When I click the button corresponding to the PDF...
Im trying to create a spinning dial control, basically a set of 6 digits that spin around and around to give the effect of a spinning number meter (similar to your power/water meters, or perhaps a poker machine, in fact very similar to the existing UIPickerView control, but with a completly different look and feel). So far, I almost hav...
Hi guys, im new to iphone developing so please teach me on stuff that i may miss out. so basically i have graphview.m which creates a coreplotviewcontroller.view in this way CorePlotViewController *aCorePlotViewController = [[CorePlotViewController alloc] initWithNibName:@"CorePlotViewController" bundle:nil]; aCorePlotViewControlle...
I have a CAEAGLLAYER in a normal UIView created using: + (Class)layerClass { return [CAEAGLLayer class]; } I have a method - (void)renderExistingPointsFromModel That gets points from a database and renders it by presenting the renderbuffer at the end. A parent controller calls this method by: [drawingCanvasView renderExistingPoi...
Hi, I want to animate through an array of CATextLayers, one after the other. The layers are created and added in a loop. I need to the animation to work like a flip book. Up to now, as a proof of concept, I have Used CABasicAnimations but in order to animate multiple layers in sequence, I think I need one of the other Core Animation opt...
I have a UIView subclass that I'm drawing a PDF onto (using a CATiledLayer). I also need to draw on a specific region of that PDF, however the coordinate plane of the CATiledLayer when using CG to draw is way screwy. See image: I have a point (200,200), that I need to convert to the CATiledLayer's coordinate system, which is the 2nd ...
What is a CALayer (as seen in the layer property on a UIView) and where would we use such a class? ...
I've been trying to make a short animation that reverses halfway through with a static method that can be called by my view controllers. This works fine. But I need it to perform a selector when the reverse takes place, essentially in the middle of the animation. The method setAnimationDidStopSelector only fires when the entire animati...
Drawing/painting should always be done on the GUI thread otherwise deadlocks can occur!... How do you determine if a call may cause unsafe painting off of the main thread for iOS? The problem is we get stacks like this which are not on the main thread... #19 0x02a788d2 in -[CALayer drawInContext:] #20 0x02a784b0 in backing_callback #2...
I have a layer-hosting view set up like this in a custom NSView subclass: [self setLayer:rootLayer]; [self setWantsLayer:YES]; I add all the sublayers to the layer tree after I called setNeedsDisplay on each sublayer. Each layer's content is provided by a drawLayer:inContext method of my layer's delegate. Here is my problem: After i...
I have a UIViewController implementation which builds a core image cube and rotates it while there are touches events occuring. It has the following methods: initController touchesBegan touchesMoved touchesEnded continueSpinning I am trying to continue rotating the cube after the touchesEnded fires for an amount of time (say 2 sec...
I have created a CAGradientLayer for my custom UIButtons. The code for creating it is as follows: CAGradientLayer *gradient = [CAGradientLayer layer]; gradient.frame = btn.bounds; gradient.cornerRadius = 10.0f; locations=[[NSArray alloc] initWithObjects: LOC_0, LOC_5, LOC_51,LOC_1, nil]; [gradient setLocations:locations]; colorNext=[...
How do you make the background of an IKImageBrowserView transparent? There seems to be no background color option in interface builder. What I've tried: I've never used Core Animation, but I saw IKImageBrowserView has a setBackgroundLayer method, so I tried the following, which had no effect: CALayer* layer = [CALayer layer]; [layer...
Hi, I have a sequence of images that I would like to animate. I am using the CAKeyframeAnimation class to run the animation. Here is the relevant part of the code: [keyAnimation setValues:arrayOfImages]; [keyAnimation setCalculationMode:@"discrete"]; keyAnimation.fillMode = kCAFillModeForwards; keyAnimation.removedOnC...
Hi I want to perform a simple rotation with core animation using this code: [UIImageView beginAnimations:nil context:nil]; [UIImageView setAnimationDuration:1]; [UIImageView setAnimationRepeatCount:5]; CATransform3D rotationTransform = CATransform3DIdentity; rotationTransform = CATransform3DRotate(rotationTran...
I have an animation that works perfectly on the first invocation. But if I want to animate the very same layer again, using the same code, it completes immediately and the animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag is invoked on the delegate with the flag value NO. Here is the code that adds the animation: imag...