core-animation

Repeating busy circle animation

断了今生、忘了曾经 提交于 2019-12-25 03:54:42
问题 I am currently trying to create a busy animation that looks like this: The broken part of the loop continually spins around the circle to signal that an operation is in progress. I am defining two circles using CAShapeLayer, one circle is 'filling in' the circle with strokeEnd and the other is 'clearing' with strokeStart. The 'clearing circle' starts 1/10 of the way in front of the 'filling circle': NSInteger radius = self.frame.size.width / 2; CGFloat lineWidth = radius / 7.5; UIColor *color

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

跟風遠走 提交于 2019-12-25 03:39:13
问题 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 code to a button: [UIView beginAnimations:@"Animation" context:nil]; [UIView setAnimationDuration:3]; CGRect rect = self.table.bounds; rect.size = CGSizeMake

UIView Animation Flip With Axis on at Top of View

房东的猫 提交于 2019-12-25 02:18:48
问题 I have a UIView that I would like to animate a flip up. This isn't like UIViewAnimationOptionTransitionFlipFromTop because that places that axis in the middle of the view. I would like to have the axis at the top of the view, so that it flips up similar to how a pad of paper flips from the top axis (NOT a page peel). [UIView transitionWithView:self.view duration:0.6 options:UIViewAnimationOptionTransitionFlipFromTopAxis // <---- Wish there was an option like this animations:^{ // Exchange the

The device freezes when there are a lot of UIView animation running with UILabels using shadows and I press the Home button

↘锁芯ラ 提交于 2019-12-25 01:17:11
问题 I'm having some problems in my application. The error occurs when I'm in a screen with a lot of icons (UIViews), each one running a animation. This screen reminds the springboard screen, and the animation visual is similar too. So, if I press the home button, the application doesn't goes to background and I can't do anything. Even the power button doesn't work. And the icons continue shaking. If I remove the call for label creation method, this don't happens. Any advice? Thanks! Animation

CATransform3DMakeRotation animating trough zero (from -45 to +45 angle)?

谁都会走 提交于 2019-12-25 00:38:04
问题 I'm trying to do a simple horizontal flip animation with a bounce effect. [UIView animateWithDuration:0.4 delay:0 options:UIViewAnimationCurveEaseIn animations:^{ front.layer.transform=CATransform3DMakeRotation(DEGREES_TO_RADIANS(90), -1.0,0.0,0.0); // flip halfway } completion:^(BOOL finished) { // swap view front.alpha=0; back.alpha=1; [UIView animateWithDuration:0.5 animations:^{ // flip remaining + bounce back.layer.transform = CATransform3DMakeRotation(DEGREES_TO_RADIANS(45), 1.0,0.0,0.0

Dual Container View Animation iOS

偶尔善良 提交于 2019-12-24 19:02:38
问题 So I've got a ViewController, which has two Container Views. The top one is the main content. The bottom one is a banner that will hide/show on certain events. The bottom one is positioned such that it is under the tab bar until the event occurs. When the event occurs, the frame of the main view is shrank and the frame of the banner is repositioned, such that it appears to 'slide' into the view and become available. The problem I'm having is, unless I resize the main view in the storyboard

Changing the layer shape for CPTPlotSpaceAnnotation?

帅比萌擦擦* 提交于 2019-12-24 17:17:54
问题 I want to add a widget to my graph that a user can click and drag. I've managed to do this using CPTPlotSpaceAnnonation (because I also want it to also scroll with the data) and CPTBorderedLayer. The basic functionality works and now I want to improve the look of the widget. So far it's just a green circle. The follow code generates the circle below, notice how the shadow is clipped to the rect of the layer and the border follows the layer and not the circle, How can I stroke the circle and

How to get points of Arc?

假如想象 提交于 2019-12-24 14:05:03
问题 I am working on core animation and core graphics.I am drawing one arc with centre (0,0).Now i want to draw line after arc.i can draw arc but then after i am not able to get two different point of arc.How can i get it?Here is code : CGMutablePathRef retPath = CGPathCreateMutable(); CGPathMoveToPoint(retPath, NULL, 20, 0); CGPathAddLineToPoint(retPath, NULL, 75,10); CGPathAddArc(retPath, NULL, 75, 10, 20, 240, 360, YES); return retPath; Please help me.Thanking you.Hint will also be appreciated.

How can I make this animation effect in iPhone development? Quartz2d, Core Animation?

允我心安 提交于 2019-12-24 10:56:04
问题 What I would like to make is a bar with growing animation and the text(number) also growing with the value of bar length. It looks like: The bar should be growing horizontally and the text with number should grow too. And the user may be want to play the animation again by tap "Replay". After read apple programming guide and some great tutorials, I have a general idea. With Quartz2d, I could draw the bar and also the vertical line, and also the text as well. But Quartz2d does not have

CoreAnimation setFrameCenterRotation Doesn't Animate Properly

血红的双手。 提交于 2019-12-24 10:55:58
问题 I'm having a bit of trouble with getting CoreAnimation to rotate an NSView about its center point. All I want to do is rotate an NSView while keeping its center point static so that the object appears to rotate in place. The way I chose to do this involves the use of the animator property in NSView. The code is as follows: [NSAnimationContext beginGrouping]; [[NSAnimationContext currentContext] setDuration:1.0]; [[view animator] setFrameCenterRotation:45.0]; [NSAnimationContext endGrouping];