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
20
votes
6 answers

Hidden property cannot be changed within an animation block

I've got two UILabels embedded within a UIStackView. The top label stays visible constantly, but the bottom label is toggled on and off via the hidden property. I wanted this effect to be animated, so I stuck it in an animation block: private func…
Alex
  • 337
  • 2
  • 10
19
votes
4 answers

Highlighting a UIView similar to UIButton

I have a UIView with a number of subviews and a Tap gesture recognized associated and I want to mimic it having a 'touch' effect. That is, when the tap happens, I want to show the container view to have a different background color and the text of…
Jonas Gardner
  • 2,458
  • 5
  • 22
  • 28
19
votes
1 answer

How do you animate the sublayers of the layer of a UIView during a UIView animation?

In a UIView animation for a view, you can animate its subviews being laid out by including UIViewAnimationOptionLayoutSubviews in the options parameter of [UIView animateWithDuration:delay:options:animations:completion:]. However, I cannot find a…
ememem
  • 968
  • 1
  • 10
  • 23
19
votes
3 answers

Animate UICollectionView frame change when inserting cells

I want to change the frame size of a UICollectionView in an animation that runs alongside an animated cell insertion to the same collection view inside a performBatchUpdates:completion: block. This is the code that triggers the cell…
Ole Begemann
  • 135,006
  • 31
  • 278
  • 256
18
votes
3 answers

show animation when addsubview

I want to add a subview with animation. I am using add sub view so it is not showing any animation so I want to show any animation when I am doing this... I am using below code :- UIViewController *vControllerHome = [[viewTemp alloc]…
18
votes
1 answer

UIView.animateWithDuration in Swift 2.0?

Before explain my problem, it is important to say that I already implemented the suggestion made in this question and I think my doubts about this animateWithDuration method are quite different, despite both questions having a very similar…
Jadekin
  • 534
  • 2
  • 5
  • 15
18
votes
1 answer

Animated Images in a UIButton

What is the best way to animate images of a button? Say I want to cycle through like 6 frames and have the user still be able to click the button? Should I animate the images and just have an invisible button on top of it in interface builder? Is…
Cherr Skees
  • 1,508
  • 2
  • 21
  • 37
17
votes
2 answers

How do I animate child view controllers when adding to/removing from a container view controller?

I have the following 2 functions that add and remove child view controllers triggered from a container view controller: @discardableResult func addChildViewController(withChildViewController childViewController: UIViewController) -> UIViewController…
John Doe
  • 1,005
  • 2
  • 8
  • 23
17
votes
2 answers

UIScrollView touch events during animation not firing with animateWithDuration: but work fine with UIView beginAnimations:

I have a UIScrollView subclass that I am programmatically scrolling using UIView animations. I'd like the user to be able to tap or zoom into the UIImageView content of the Scroll View while the animation is taking place. This has worked fine while…
17
votes
5 answers

Animate nav bar title text change

In my app, I have a page view controller that allows the user to swipe between different "sections" of the app, and at the top in the nav bar I change the title text to the new section the user has swiped to via…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
16
votes
4 answers

layoutSubviews during an animation?

I have a UIView with a bunch of subviews, all positioned using layoutSubviews. When the view is resized, the relative positions all change. I'd like these re-calculations to happen during an animated resize (using +[UIView beginAnimations:] calls).…
Ben Gottlieb
  • 85,404
  • 22
  • 176
  • 172
16
votes
6 answers

UIView animation stops when view disappears, doesn't resume when it re-appears

Here's my config: I have a storyboard with a ListViewController. ListViewController has a subview UIView called EmptyListView. EmptyListView is shown only when there are no items in the UITableView, otherwise it is hidden. EmptyListView has a…
chrysb
  • 1,351
  • 2
  • 13
  • 20
16
votes
3 answers

How to stop and reverse a UIView animation?

I have animated a UIView so that it shrinks when the user touches a toggle button and it expands back to its original size when the user touches the button again. So far everything works just fine. The problem is that the animation takes some time -…
Mischa
  • 15,816
  • 8
  • 59
  • 117
16
votes
3 answers

ios UIView animation curves

Is there any way to do things the "short and easy" way like below? The curve appears to still use EaseOut. [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; [UIView animateWithDuration:0.5 animations:^{ // ... do stuff here }];
Jacksonkr
  • 31,583
  • 39
  • 180
  • 284
15
votes
1 answer

Export CoreAnimation to video file

I wrote a basic animation framework using Core Animation on iPhone. It has the functionality for pause and resume of animations and also can run animations at specified time. My basic problem is that I cannot find a way to export my animations to a…
Azeem
  • 251
  • 5
  • 13