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 6380229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:14:29+00:00 2026-05-25T02:14:29+00:00

I want to show the activity indicator on tap gesture and also navigate from

  • 0

I want to show the activity indicator on tap gesture and also navigate from current viewcontroller to next viewcontroller I have written code on tap gesture method my code is –

- (void)tapToAutoFocus:(UIGestureRecognizer *)gestureRecognizer
{
    textLabel.hidden = YES;
    indicator  = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(140, 150, 30, 30)];
    [indicator setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhiteLarge];
    [self.view addSubview:indicator];
    [indicator startAnimating];

    AccountAnfordernViewController *accountAnfordernViewController = [[AccountAnfordernViewController alloc]init];
    [self.navigationController pushViewController:accountAnfordernViewController animated:YES];
    [accountAnfordernViewController release];
}

It navigates to next view controller but indicator are not showing, I want when it navigate to nextviewcontroller at that time indicator also should be show for some time and then navigate to next view controller. What should I do for that?

  • 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-05-25T02:14:29+00:00Added an answer on May 25, 2026 at 2:14 am

    I suspect you need to do something like this:

    - (void)tapToAutoFocus:(UIGestureRecognizer *)gestureRecognizer
    {
        textLabel.hidden = YES;
        indicator  = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(140, 150, 30, 30)];
        [indicator setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhiteLarge];
        [self.view addSubview:indicator];
        [indicator startAnimating];
        [self performSelector:@selector(pushAccountAnfordern) withObject:nil afterDelay: 0.1];
    }
    
    - (void) pushAccountAnfordern;
    {
        AccountAnfordernViewController *accountAnfordernViewController = [[AccountAnfordernViewController alloc]init];
        [self.navigationController pushViewController:accountAnfordernViewController animated:YES];
        [accountAnfordernViewController release];
    }
    

    You can vary the delay. And, indeed, 0.0 may be just fine. This way of doing it lets the current run loop end, giving a chance for the spinner to start showing before starting the next bit of code. For a different approach (with potential side effects) to forcing the spinner to start before the current run loop ends this this SO question.

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

Sidebar

Related Questions

I want to show activity indicator while sending and receiving synchronous asihttprequest from server.
I'm using SDWebView image and i want to show an Activity Indicator as placeholder,
Basically I want an activity indicator that will show at a glance that there
I have used 4 tabs.I want show tabbar in all activity so i used
I have an Activity where I want to show a ProgressDialog. I override onCreateDialog
I want to show alertview with message: Loading data and spinning activity indicator. How
i'm using ASIHTTPRequest in asynchrone mode and i want to show an Activity Indicator
I want to load data from Internet. While loading data I show a loading
I want to show a progress dialog when my activity is busy preparing something.
I want to show a jumping bird. I have different images of that bird

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.