core-animation

Rotating Two UIImageView in X Direction

送分小仙女□ 提交于 2020-01-14 03:15:08
问题 i wanna rotate two images i put one images behind the other but when i rotate them with the following code the back image will be above the front image and i assign their ZPOstion but their is no change this link for my view before rotate http://i39.tinypic.com/ivv2ah.png and after rotate http://i43.tinypic.com/ic05xj.png how this happen [UIView animateWithDuration:0.2 animations: ^{ CALayer *myLayer=self.image2.layer; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@

Using CATransform3D to create flip animation

爷,独闯天下 提交于 2020-01-13 13:11:14
问题 I'm trying to recreate UIViewAnimationTransitionFlipFromRight (and left). My reason for doing so, as shown below, is to make changes to AVCaptureVideoPreviewLayer in the middle of the animation, when the layer is obstructed. UIViewAnimationTransitionFlipFromRight won't let me stop the animation half way, make session changes, and continue, so here is my best shot at it. While this works, it's just not the same as UIViewAnimationTransitionFlipFromRight. The layer starts to rotate, but more of

Using CATransform3D to create flip animation

穿精又带淫゛_ 提交于 2020-01-13 13:11:14
问题 I'm trying to recreate UIViewAnimationTransitionFlipFromRight (and left). My reason for doing so, as shown below, is to make changes to AVCaptureVideoPreviewLayer in the middle of the animation, when the layer is obstructed. UIViewAnimationTransitionFlipFromRight won't let me stop the animation half way, make session changes, and continue, so here is my best shot at it. While this works, it's just not the same as UIViewAnimationTransitionFlipFromRight. The layer starts to rotate, but more of

Using CATransform3D to create flip animation

纵然是瞬间 提交于 2020-01-13 13:11:05
问题 I'm trying to recreate UIViewAnimationTransitionFlipFromRight (and left). My reason for doing so, as shown below, is to make changes to AVCaptureVideoPreviewLayer in the middle of the animation, when the layer is obstructed. UIViewAnimationTransitionFlipFromRight won't let me stop the animation half way, make session changes, and continue, so here is my best shot at it. While this works, it's just not the same as UIViewAnimationTransitionFlipFromRight. The layer starts to rotate, but more of

Keyframe animation key time

99封情书 提交于 2020-01-13 09:04:10
问题 I've just created a keyframe animation like this: [UIView animateKeyframesWithDuration:10 delay:0 options:0 animations:^{ [UIView addKeyframeWithRelativeStartTime:0 relativeDuration:.1 animations:^{ view.alpha = 0; }]; } completion:nil]; And this is a CAKeyframeAnimation that gets created: (lldb) po [self.layer animationForKey:@"opacity"] <CAKeyframeAnimation:0x10a6364b0; keyTimes = ( 0, "0.1", 1 ); values = ( 1, 0, 0 ); calculationMode = linear; delegate = <UIViewKeyframeAnimationState:

Curving/warping views with CoreAnimation or OpenGL for carousel effect

独自空忆成欢 提交于 2020-01-13 08:37:28
问题 Right now I'm populating a UIScrollView with a series of views. The views need to be warped to make the UIScrollView appear like a carousel. In other words when the user scrolls it needs to be like a circle. I've never done anything quite like this before, but I'm assuming CoreAnimation is out of the question and OpenGL needs to be used. If this is possible with CoreAnimation or Quartz then I really just need a sample on how to warp the views and I can figure the rest out myself but I'm not

How to animate fill color of path drawn with CGContextDrawPath, etc in drawRect:?

梦想与她 提交于 2020-01-13 06:48:48
问题 I wonder if is possible to animate the fill color of a path I have drawn using CoreGraphics? I am drawing this: Simple drawing with Quartz - Core Graphics and I want to change its fill color from white to let's say gray. Is this possible? I know the existence of view.layer.content property but Is this useful here? Though, I am not sure how can I use it in this case. Thanks in advance. Update I am trying this approach (its buggy, hence I can tell if its going to work) basically I am creating a

How to animate fill color of path drawn with CGContextDrawPath, etc in drawRect:?

早过忘川 提交于 2020-01-13 06:48:00
问题 I wonder if is possible to animate the fill color of a path I have drawn using CoreGraphics? I am drawing this: Simple drawing with Quartz - Core Graphics and I want to change its fill color from white to let's say gray. Is this possible? I know the existence of view.layer.content property but Is this useful here? Though, I am not sure how can I use it in this case. Thanks in advance. Update I am trying this approach (its buggy, hence I can tell if its going to work) basically I am creating a

How Can I Animate the Size of A UICollectionViewCell on Scroll so the middle one is largest?

自闭症网瘾萝莉.ら 提交于 2020-01-13 04:55:09
问题 I have a UICollectionView that shows several rows with one, full-width column (looks like a UITableView) What I'd like to achieve is something similar to this: ... where the middle cell has a much greater height. As the user scrolls up and down, the cells before and after the middle cell animate back to the default height for the given cell. Can somebody outline how I should approach this problem? 回答1: I use this Swift 3 code in my horizontal UICollectionView . func scrollViewDidScroll(_

Rotate in z-axis like core-animation slot machine

左心房为你撑大大i 提交于 2020-01-13 00:41:13
问题 I was to able to move or animate my UIView by this code down here: - (void) makeAnim1{ //downward animation [UIView animateWithDuration:1.5 delay:0.15 options: UIViewAnimationCurveLinear animations:^{ carousel.frame = CGRectOffset(carousel.frame, 0, 650); } completion:^(BOOL finished){ //task after an animation ends [self performSelector:@selector(makeAnim1_1) withObject:nil afterDelay:2.0]; NSLog(@"Done!"); }]; } - (void) makeAnim1_1{ //upward animation [UIView animateWithDuration:1.5 delay