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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:23:22+00:00 2026-05-30T20:23:22+00:00

Here is the source code: – (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath{ [self loadingWithBackground]; //this

  • 0

Here is the source code:

- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath{
  [self loadingWithBackground]; //this view called the spinner

  return indexPath;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
  [tableView deselectRowAtIndexPath:indexPath animated:YES];

  [self performSelectorOnMainThread:@selector(performIndexPath:) 
                         withObject:indexPath 
                      waitUntilDone:YES];
}

-(void)performIndexPath:(NSIndexPath *)aIndexPath{

//application logic, flip the view over, and display the data
}

But it works perfectly right:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
          [tableView deselectRowAtIndexPath:indexPath animated:YES];
          [self loadingWithBackground];
          return;

        //bababbaa
}

The code of loadingWithBackground:

-(void)loadingWithBackground{
  [self performSelectorOnMainThread:@selector(performLoadingWithBackground) 
                         withObject:NULL
                      waitUntilDone:YES];

  [m_oUIActivityIndicatorView startAnimating];
}
-(void)performLoadingWithBackground{
  self.m_isLoadFinished = NO;

  if(m_oUIActivityIndicatorView != NULL){
    [m_oUIActivityIndicatorView removeFromSuperview];
    m_oUIActivityIndicatorView = NULL;
  }

  if(m_oUIActivityIndicatorBackgroundView != NULL){
    [m_oUIActivityIndicatorBackgroundView removeFromSuperview];
    m_oUIActivityIndicatorBackgroundView = NULL;
  }

  m_oUIActivityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
  [m_oUIActivityIndicatorView setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhiteLarge];
  m_oUIActivityIndicatorBackgroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, m_oUIActivityIndicatorView.frame.size.width, m_oUIActivityIndicatorView.frame.size.height)];
  [m_oUIActivityIndicatorBackgroundView setBackgroundColor:[UIColor grayColor]]; //I love the black one
  [m_oUIActivityIndicatorBackgroundView setAlpha:0.8];
  [m_oUIActivityIndicatorBackgroundView setCenter:CGPointMake(self.view.frame.size.width/2.0, self.view.frame.size.height/2.0)];
  m_oUIActivityIndicatorBackgroundView.layer.cornerRadius = 10;
  [m_oUIActivityIndicatorBackgroundView addSubview:m_oUIActivityIndicatorView];
  m_oUIActivityIndicatorView.hidden = NO;
  [self.view addSubview:m_oUIActivityIndicatorBackgroundView]; 
}

I tried to perform the loadingWithBackground using main thread, but it also can’t show. When I copy the method: loadingWithBackground in the didSelectRowAtIndexPath, it doesn’t shows the loadingWithBackground neither. How can I achieve it? 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-30T20:23:24+00:00Added an answer on May 30, 2026 at 8:23 pm
    NSInteger SelectedIndex;
    
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
      SelectedIndex = indexPath.row;
      // Start animating activity indicator
      [self performSelectorOnMainThread:@selector(performIndexPath) withObject:nil waitUntilDone:NO];
      // OR USING TIMER 
      // timer = [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(performIndexPath) userInfo:nil repeats:NO];
    }
    
    -(void)performIndexPath {
      //stop activity indicator
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

you can view full source code here dpaste.com/hold/167199 Error: delete() takes exactly 2 arguments
Our projects in TFS are organized like this: $\DefaultCollection\ProjectName\Source <-- source code goes here
I am looking into this New EmailAddressAttribute part of their source code here .
Here is the source code for this test: var tags = new List<string> {Portland,
Here is source code: @OneToOne(fetch = FetchType.LAZY) @Cascade({SAVE_UPDATE, EVICT, DELETE}) @JoinColumn(name = A_ID, nullable
I have an application I need to analyze. I have the source code here.
I am trying to install MySQLdb package. I found the source code here .
Here's the relevant bit of the source code: class Dice { String name ;
I download the latest source code from here: http://aspnetwebstack.codeplex.com/SourceControl/list/changesets 1) add the system.web.mvc project
Looking through the massive android source code, anyone on here who know where exactly

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.