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

  • SEARCH
  • Home
  • 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 8547421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:15:46+00:00 2026-06-11T13:15:46+00:00

Now i am working in iPhone application, Using UIImageView to create a animation and

  • 0

Now i am working in iPhone application, Using UIImageView to create a animation and it’s working fine, then i tried to call one method for when the animation once completed then the button to show on the screen, but that button showing first then the animation starts, i want once animation completed then the button showing on the screen, how to fix this issue? please help me

Thanks in Advance

I tried this for your reference:

 - (void)viewDidLoad
    {
        [super viewDidLoad];


        NSArray * imageArray  = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"cardopen.png"], 
                                         [UIImage imageNamed:@"middlecard.png"],
                                         [UIImage imageNamed:@"thirdcard.png"], 
                                         [UIImage imageNamed:@"a.png"],

                                         [UIImage imageNamed:@"cardopen1.png"],
                                         [UIImage imageNamed:@"middlecard2.png"],
                                         [UIImage imageNamed:@"thirdcard1.png"], 
                                         [UIImage imageNamed:@"2.png"],

                                         nil];

         UIImageView * cardsImage = [[UIImageView alloc] initWithFrame:CGRectMake(10, 0, 400, 300)];
            cardsImage.animationImages = imageArray;
            cardsImage.animationDuration = 8.0;
            cardsImage.animationRepeatCount=1; // one time looping only
            [self.view addSubview:cardsImage];
            [cardsImage startAnimating];  

             [self method1]; // To Call a method1 to show UIButton (Once the animation is completed, then to call a method1)

    }

    -(void)method1
    {
        UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        btn.frame=CGRectMake(10, 40, 50, 50);
        [self.view addSubview:btn];
    }
  • 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-11T13:15:47+00:00Added an answer on June 11, 2026 at 1:15 pm

    (Why doesn’t anybody understand the concept of asynchronous methods? Is this that hard?)

    [cardsImage startAnimating];
    

    returns immediately, not after the animation finished. You have to set an explicit timeout:

    NSTimer *tm = [NSTimer scheduledTimerWithTimeInteral:imageView.animationDuration * imageView.animationCount // assuming animationCount is not 0
        target:self
        selector:@selector(method1)
        repeats:NO
        userInfo:nil];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Now i'm working in iPhone application, Using Label to set a text like (To:),
The Spotify iPhone app I was working on, was running fine, but now I
I've been working on iPhone application for quite a while now, and, I've came
I am right now working with one application where i need to take one
I am newbie to iphone technology,right now i m working with an application where
I am working in one iPhone application in which I need to add inApp
I am developing iPhone application which is using the 3 projects. One project is
I am working on SMS application for Iphone .. And now i want to
So I'm developing and iPhone game right now and everything has been working just
I am fairly new to iPhone development. Right now, I am working on an

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.