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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:59:28+00:00 2026-05-19T01:59:28+00:00

How can one change the textLabel or the detailTextLabel of a specific UITableViewCell dynamically?

  • 0

How can one change the textLabel or the detailTextLabel of a specific UITableViewCell dynamically?

Basically, I am downloading a set of files from the internet whenever the user taps on a cell. Now instead of the progress indicator, I would like to display the name of the file currently being downloaded. I would like to keep updating the detailTextLabel to show the (current) filenames until all the files are downloaded.

  • 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-19T01:59:29+00:00Added an answer on May 19, 2026 at 1:59 am

    Assuming you’re in a method like tableView:didSelectRowAtIndexPath: (or have another way to get the index path to the cell), you can do something like this:

    UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
    
    UILabel *label = nil;
    for(UIView *subview in cell.contentView.subviews) {
        if([subview isKindOf:[UILabel class]]) {
            label = (UILabel*)subview;
            break;
        }
    }
    
    if(label)
        label.text = @"New text";
    

    This will find the first UILabel in the cell, and may not work if your cell has more than one label. A more robust way to do it is to set the tag of the label when you create the cell (this can be done in Interface Builder or in code). Then you can find the label like this:

    UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
    
    UILabel *label = nil;
    for(UIView *subview in cell.contentView.subviews) {
        if([subview isKindOf:[UILabel class]] && [subview tag] == kDetailLabelTag) {
            label = (UILabel*)subview;
            break;
        }
    }
    
    if(label)
        label.text = @"New text";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can one change the formatting of output from the logging module in Google
I will like to know how I can change just one color in a
how can i change the size of (particular one)cell which is the part of
How can I change the root password to an empty one in MySql? The
Probably easy one. How can i change rows or column heigh? xlApp = new
if pictures are uploaded using one style, how can i change the style of
I wanted to change the divider height dynamically. From whatever I have searched it
Is there a reason one can change the access modifier of an overridden method?
I am using JXTaskPane component. I want to know whether one can change the
In MATLAB one can change the font name of things such as ylabel ,

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.