ios - How to know when UIView animations have all completed -


A custom view I made is being animated by its container - in my opinion I have other animations with parts of the subviews I'm updating the example, a UICOllectionView)

I think it's throwing errors

failure failure in *** - [UICollectionView _endItem animation

Excavation around I see that the animation is in my opinion:

   

So now I'll check before executing the animation:

  NSArray * animation keys [[self. Layer animation kayak]; (Animation for Animation * Key for Animation * Key) * Animation = [Self. Player Animation: Key]; }  

And I see that animation objects have been returned:

At this point I would like to "wait" until all the animations themselves update Not completed

I think I can add myself as a CAAM representative.

But this is a bit confusing and difficult to track.

Is there an easy way to use a UIView method - very high level?

You can use the UIView method to do an animation in the container:

  [UIView Chetanvastav: Animation: Completion:]; [UIView ChetanDance: Duration: Option: Animation: Completion:];  

You should add attribute to your custom view:

  @propertyBOOL is an annihilation;  

An animation block is run in the container and the view changes. Adding the property This method accepts the block which will be removed when the animation is completed. Example:

  [UIView animateWithDuration: 1.0 Animation: ^ {// Animation = Your animation block view = Yes; View1.frame = CGRectMake (50.0F, 50.0F, 100.0F, 100.0F); // etc} Closing: ^ (BOOL Finish) {view1.isAnimating = NO; NSLog (@ "animation complete."); }];  

Now your view can see if the scene is animating:

  if (self.isAnimating) NSLog (@ "Visual Animation is") ;  

Comments