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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:41:15+00:00 2026-05-16T14:41:15+00:00

i have the following rows in an iphone table view and they sometimes leak

  • 0

i have the following rows in an iphone table view and they sometimes leak the text from one of the rows to another.

if (row <1)
    {
        cell.detailTextLabel.text=@"h3ello";
             UIImage *image = [UIImage imageNamed:@"icon.png"];
           cell.imageView.image = image;   
    }
      else if (row ==2)
    {
        cell.detailTextLabel.text=@"world";
        UIImage *image = [UIImage imageNamed:@"ticon.png"];
        cell.imageView.image = image
}

and sometimes these images get screwed up in between and also i have another row that includes a text color. This causes various and random rows get the red color when i am scrolling. im not sure what the error is..

EDIT

This is the culprit involved

 cell.textLabel.textColor = [UIColor redColor];

once i remove this none of the rows get mixed up with the colors.
how can i implement this color to a specific row without it leaking onto the others randomly.

  • 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-16T14:41:16+00:00Added an answer on May 16, 2026 at 2:41 pm

    Because cells by default are reusable you should always set ALL parameters for ALL cells you ever used.
    If you want to change color for one cell you should set default color for OTHER cells too.
    So use cell.textLabel.textColor = .... in each case with proper color.

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

Sidebar

Related Questions

I have the following rows in a css file body {text-align: center;} table {margin:
I have an sql table which has the following rows. (4081, 3, '', 'contrapreneurship.jpg',
I have a the following table with rows: =============================================== id| name | group1 |
I have the following query which have 1000 rows select staffdiscountstartdate,datediff(day,groupstartdate,staffdiscountstartdate), EmployeeID from tblEmployees
Let's say I have the following rows: id data (TEXT) 1 abc100dfg 2 abc200dfg
I have a table with the following rows <table> <tr> <td><div>Suresh</div></td> <td><div>Ramesh</div></td> <td><div>Sachin</div></td> </tr>
I have the following rows in my table COL1 EXTRA DOUBLE TEST 12 TEST
I have a column in a SQL Server table that has the following rows:
I have a table with a field (cat_tags) which contain the following rows:- id
I have the following html. Its a table that can contains many rows id=rows_x.

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.