Questions tagged [uiviewanimation]

There is no default class called UIViewAnimation, this tag refers to methods that perform animation on UIView objects.

includes a number of different ways to perform animations. One of the simplest is to use the animation support in the UIView class.

Prior to iOS 4, the only way to do UIView animation was with beginAnimations:context/commitAnimations. Those methods are discouraged in iOS 4 and later.

For iOS versions greater than 4.0, you should use the new UIView class methods whose names start with animateWithDuration:

1798 questions
8
votes
3 answers

UIView animation doesn't animate on the first try

My issue is that my UIView animation only works after the first time. I have two different sets of animations. The first set works correctly, its the second set that is giving me issues. The first set slides 4 buttons onto the screen a little…
LuKenneth
  • 2,197
  • 2
  • 18
  • 41
8
votes
1 answer

Swift - UIView.transitionFromView -

What happens to your “fromView” after you use UIView.transitionFromView? How do you get it back? (re-initialize it?). Here’s a simple example I made and get “fatal error: unexpectedly found nil while unwrapping an Optional value” when I try to get…
8
votes
0 answers

Forcing a UIView to redraw its contents inside of an animation block

I have a superview A and a subview B. In A's drawRect(_:) I do some line drawing that depends on the position and size of subview B. In class A (but not in its drawRect(_:)) I also have an animation block that moves and scales B. The problem is that…
wltrup
  • 778
  • 1
  • 4
  • 14
8
votes
3 answers

Custom animation on UICollectionView reload data

I would like to animate the reload of a collection view such that when a cell is selected I get an animation similar to dealing cards in a solitaire game. (Imaging old MS solitaire card dealt) I've searched around for "custom UICollectionView reload…
Avba
  • 14,822
  • 20
  • 92
  • 192
8
votes
1 answer

Animating the mask for a UIView

I can create a mask like this: CALayer *mask = [CALayer layer]; mask.contents = (id)[[UIImage imageNamed:@"mask.png"] CGImage]; mask.frame = CGRectMake(0, 0, 10, 10); self.content.layer.mask = mask; And this will correctly reveal the…
soleil
  • 12,133
  • 33
  • 112
  • 183
8
votes
3 answers

UIViewController half screen "drawer slide" animation

I am trying to have a UIViewController that appears with a "slide" animation from the right. Not like a Push segue, not like the Facebook app. I want the new ViewController to slide ON TOP of the current one (not push it away), but only cover PART…
CaptJak
  • 3,592
  • 1
  • 29
  • 50
8
votes
2 answers

bottom up animation using Pushviewcontroller?

I am new to iPhone SDK. I am using the following code but the animation happens from right to left when I click this button. I want to do from bottom to top. - (IBAction)clickedsButton:(id)sender { [UIView beginAnimations:nil context:NULL]; …
user141302
8
votes
1 answer

UIView animation warning

I am using following code [UIView animateWithDuration:1.0 delay:0.05 options:UIViewAnimationCurveEaseIn animations:^{ //Code }…
Hassy
  • 5,068
  • 5
  • 38
  • 63
8
votes
3 answers

Best way to handle a chain of animations with UIViewAnimations

I am build an iOS application in which I have a requirement for the backgroundColor of the view to animation through a selection of colors. In my viewDidLoad method I am basically firing off a chain of UIView animations using the following. -(void)…
Paul Morris
  • 1,763
  • 10
  • 33
  • 47
8
votes
1 answer

How to run code after UIView transitionWithView?

I want to run a block of code after an animation is completed but the compiler shows the following error : "Incompatible block pointer types sending 'void (^)(void)' to parameter of type 'void (^)(BOOL)'" Here is my code, I am not sure what I am…
Fellow GEEK
  • 81
  • 1
  • 2
8
votes
2 answers

Animating an image view to slide upwards

I am attempting to make an image view (logo below) slide upwards by 100 pixels. I am using this code, but nothing happens at all: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:3]; logo.center = CGPointMake(logo.center.x,…
Wes Cossick
  • 2,923
  • 2
  • 20
  • 35
8
votes
4 answers

transitionFromView: and strange behavior with flip.

I have a image wall (UIScrollView) and in there I have a lot of UIImageView's. Here is my code: for (ThumbPosterModel *tPoster in _thumbsPosterStack) { UIImageView *imageView = [[UIImageView alloc] initWithImage:tPoster.thumb]; …
7
votes
5 answers

Rotate a UIView on its X-axis(Horizontal axis)

I wanted to rotate a UIView on its horizontal axis for 360 degrees and then refresh the content in the view. I was looking out for solutions on this. Found a couple here n there. This is what I came out with. [UIView animateWithDuration:1…
Mobilewits
  • 1,743
  • 4
  • 21
  • 34
7
votes
2 answers

Android custom animation like airport schedule board

I want to create an animation for the text like on Airport the flight schedule board does. Dropping from top and change the text on it. Here is the image. So When I click on button the text on the image should change with the said animation. Does it…
user744881
7
votes
3 answers

CGAffineTransform affects the corner radius of my UIView

I'm applying a CGAffineTransform animation to a UIView with the following code: UIView.animate(withDuration: 0.5, delay: delay, options: [.autoreverse, .repeat], animations: { elementView.transform = CGAffineTransform(scaleX: 1.0, y: 0.4) }) {…
hgwhittle
  • 9,316
  • 6
  • 48
  • 60