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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:11:49+00:00 2026-05-22T12:11:49+00:00

I have UITableView with a navigationBar at the top. I have a refresh button

  • 0

I have UITableView with a navigationBar at the top. I have a refresh button in the right of the navigationBar.

When clicking on the refresh button, i need to start an activity indicator, refresh the table and stop the activity indicator.

-(void)refreshClicked{
    [spinner startAnimating];   //UIActivityIndicatorView object
    [appDelegate readJSONData]; //this is the method which populates the array
                                //for displaying in the tableview
}

I want know how to refresh the table after populating the array and then how to stop the activity indicator.

thanks 🙂

  • 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-22T12:11:50+00:00Added an answer on May 22, 2026 at 12:11 pm

    Refresh table:

    [tableView reloadData];
    

    Stop activity indicator:

    [spinner stopAnimating];
    

    —–EDIT—–

    From your comments, I can gather that you want to smoothly fade the spinner away and reload the tableview.

    For the tableview:

    You can reload sections of the tableview with a nice fade animation using the following code:

    [tableView reloadSections:(NSIndexSet *)sections withRowAnimation:UITableViewRowAnimationFade];
    

    Your indexset contains all the sections you want to reload and you DO have other options for the reload animation. Look here: UITableViewRowAnimations

    To create an NSIndexSet see this link

    As for your spinner, you could fade it to alpha zero before calling stopAnimating by doing this:

    -(void)fadeSpinner
    {
        [UIView beginAnimations:nil context:NULL];
        [UIView setAnimationBeginsFromCurrentState:YES];
        [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
        [UIView setAnimationDuration:0.5];
        [UIView setAnimationDelegate:self];
        [UIView setAnimationDidStopSelector:@selector(stopAnimation)];
    
        spinner.alpha = 0;
    
        [UIView commitAnimations];
    }
    
    - (void)stopAnimation
    {
        [spinner stopAnimating];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UITableView which is populated by an array, I have a button
I have a UITableView with the following code: - (void)viewDidLoad { [super viewDidLoad]; parser
I have a UITableview with a navigation bar on the top. I have a
I have an Edit button in my navigation bar, and I have an table
I have 2 view controller pages.Add Reminder page which contains save button as right
I am new to iphone development.I have created a button in UIView controller.On clicking
I have the following: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath(NSIndexPath*)indexPath { audiChassisInputViewController = [[myAudiChassisInputViewController alloc] init];
I have the following: Class Number1 .h file: myAudiCiviliteInputViewController *civiliteInputViewController; .m file: - (void)tableView:(UITableView
I have UITableView.when i click on it's 1 st row one another UITableView opens
I have UITableView with very large cells with lots of content (more than one

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.