Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8038963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:24:58+00:00 2026-06-05T03:24:58+00:00

I have the following animation block: [UIView animateWithDuration:3.0 animations:^{ NSLog(@INDEX %d, index); [self.visibleViewControllers_ enumerateKeysAndObjectsUsingBlock:^(id

  • 0

I have the following animation block:

[UIView animateWithDuration:3.0 animations:^{
            NSLog(@"INDEX %d",  index);

            [self.visibleViewControllers_ enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {                                 
                UIViewController *viewController = (UIViewController *)obj;
                if (viewController.view.tag != index){
                    if (viewController.view.tag < index){
                        NSLog(@"LOWER VIEW WITH TAG %d", viewController.view.tag);
                        [viewController.view setFrameY:self.contentOffset.y - viewController.view.frameHeight];
                    } else if (viewController.view.tag > index){
                        NSLog(@"UPPER VIEW WITH TAG %d", viewController.view.tag);
                        [viewController.view setFrameY:600];
                    } else {
                        [viewController.view setFrame:CGRectMake(0, self.contentOffset.y, selectedView.frameWidth, 460)];
                    }
                }
            }];
            //[selectedView setFrame:CGRectMake(0, self.contentOffset.y, selectedView.frameWidth, 460)];
        }completion:^(BOOL finished){
            [self.visibleViewControllers_ enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {                                 
                UIViewController *viewController = (UIViewController *)obj;
                NSLog(@"VIEW CONTROLLER Y IS %f AT INDEX %d", viewController.view.frameY, viewController.view.tag);
            }];

        }];

Basically it’s a dictionary of view controllers that it’s view I want to animate, but what’s weird is that it only performs one animation. Not all. Why is this? Is it possible to do enumeration inside an animation block?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:25:00+00:00Added an answer on June 5, 2026 at 3:25 am

    enumerate your views and animate them in your enumeration

    [self.visibleViewControllers_ enumerateKeysAndObjectsUsingBlock:^
        [UIView animation.....
    

    you did one animation and enumerate all view in this animation. just turn it around

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following block-based animation: [UIView animateWithDuration:0.5f delay:0.0f options:UIViewAnimationOptionRepeat|UIViewAnimationOptionAutoreverse|UIViewAnimationOptionAllowUserInteraction|UIViewAnimationOptionCurveEaseInOut animations:^{ [view.layer setTransform:CATransform3DMakeScale(1.3f, 1.3f,
I have the following code: [UIView animateWithDuration:2.0 delay:0.0 options:UIViewAnimationOptionAllowUserInteraction animations:^{ imageView.bounds = endBounds; }
In the following UIView animation block, I do a CGAffineTransformMakeScale and a CGAffineTransformMakeRotation ,
I have the following core animation code in my app : -(void)startCoreAnimation [UIView beginAnimations:@IconFade
I have the following animation set up using Three.js: http://frontier.lincoln.ac.uk/3d/development/Stage2/characters/man2.html Please ignore the ropey
I have the following animation AxisAngleRotation3D rotation = (AxisAngleRotation3D)Template.FindName(rotationName, this); DoubleAnimation angleAnimation = new
I have this following jquery text fly-in animation.Here is my code before I explain
I have a storyboard like the following Duration=0:0:1 Completed=DeviceExplorer_Completed> The animation for some reason
I have Divs show and hide (with an animation) using the following script (I
I have the following scenario: If I have a while block in the paint()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.