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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:47:30+00:00 2026-06-10T06:47:30+00:00

In my UITableView I’m using custom cells with a book title, book status and

  • 0

In my UITableView I’m using custom cells with a book title, book status and renew button. However, book status requires some loading view internet and therefore takes time to load.

Have tried doing Asynchronous to load only the part on the book status but it’s too hard. Therefore, I was trying to do a “Loading Data” spinner instead. Had created a class for spinner and implemented in cellForRowAtIndexPath but the spinner only shows at the end when my UITable had already finish all the loading! I have no idea where to place this codes:

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    lVC = [[LoadingViewController alloc] initWithNibName:@"LoadingViewiPad" bundle:nil];
    [self.parentViewController.view addSubview:lVC.view];
} else {
    lVC = [[LoadingViewController alloc] init];
    [self.parentViewController.view addSubview:lVC.view];
}

I have already tried placing it in viewDidLoad and even viewWillAppear but it just don’t seemed to work. The results of all just ends up that the spinner shows up at the end when all things had already finish loading.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"Cell";
UserCustomCell *cell = (UserCustomCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) {
    [[NSBundle mainBundle] loadNibNamed:@"UserCustomCell" owner:self options:nil];
    cell = userCustomCell;
    self.userCustomCell = nil;
}

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    cell.bookTitle.frame = CGRectMake(12, 0, 550, 40);
    cell.renewButton.frame = CGRectMake(600, 14, 68, 24);
}
[cell.renewButton useBlackActionSheetStyle];

cell.bookTitle.text =@"Book Title";

// I place the UIActivityIndicator class here before I do the loading
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    lVC = [[LoadingViewController alloc] initWithNibName:@"LoadingViewiPad" bundle:nil];
    [self.parentViewController.view addSubview:lVC.view];
} else {
    lVC = [[LoadingViewController alloc] init];
    [self.parentViewController.view addSubview:lVC.view];
}
NSString *reservation = [self noOfRenewalLeft:index];   ###### throw into method to do internet connection and checking
                                                                                                //method will then return NSString "reserved" or "notReserved"

if ([reservation isEqualToString: @"notReserved"]){     //if item not reserved

    if([renewalLeftString isEqualToString: @"0"]){              
        cell.bookStatus.text = @"Reached Max Renewal Limit";
    }
    else{                                                   //item not reserved & able to renew, therefore display renewal left
        cell.bookStatus.text = [NSString stringWithFormat:@"Renewal Left: %@",renewalLeftString];
    }
}
else {
    cell.bookStatus.text = @"Item Reserved/On-Hold";
}

cell.renewButton.tag = index_tag;
return cell;

}

  • 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-10T06:47:32+00:00Added an answer on June 10, 2026 at 6:47 am

    In the end what I did was to place the UIActivityIndicator in the viewDidLoad method instead, and cancelled it in viewDidAppear. It works now! Thank you everyone for your help too 🙂

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

Sidebar

Related Questions

I'm using a UITableView filled with a around 200 cells containing a title, subtitle
I have a UITableView with some custom cells in it. In these custom cells
I have an UITableView showing custom view cells that I've designed in interface builder.
I have cells in UITableView , I have made custom frame for the label
I have a UITableView which contains x amount of cells. However, I want to
I have a UItableView that segues to a different view controller. I'm using a
I am using a UITableView to display a list of cells, when the user
I have a UITableView that has some cells and I add a UITextField to
My UITableView has 3 sections. Only the cells in the 2nd sections are movable:
I have created a UITableView with a custom UITableViewCell . My cell includes 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.