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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:40:03+00:00 2026-06-04T20:40:03+00:00

I have a uitableview which I would like to grayout the text if the

  • 0

I have a uitableview which I would like to grayout the text if the cell is in a list of index values stored in a NSdictionary. As you can see I have my list of indexs to gray out stored in a nsdictionary where I get fuzzy is how to move that list into the if(condition???)

NSDictionary *myIndexList = [[inList objectAtIndex:0] objectForKey:@"myIndex"];
   NSLog( @"data from INDEX !!!!!!!! %@", myIndexList);

   if (indexPath.row == ???myIndexList????) {

       cell.textLabel.textColor = [UIColor lightGrayColor];
   }

Many Thanks and I hope this novice question finds you well.

  • 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-04T20:40:05+00:00Added an answer on June 4, 2026 at 8:40 pm
    for(NSString *aKey in myIndexList)
    {
        if(indexPath.row == [myIndexList valueForKey:aKey])
        {
             cell.textLabel.textColor = [UIColor lightGrayColor];
        }
    }
    

    This code will check through all the keys in the dictionary and if the value for a particular key is equal to the row it will change the text color to lightGrayColor.

    Now if you are just returning myIndexList as an NSArray instead of an NSDictionary you would use this:

    for(int n=0; n<[myIndexList count]; n++)
    {
        if(indexPath.row == [[myIndexList objectAtIndex:n] integerValue])
        {
             cell.textLabel.textColor = [UIColor lightGrayColor];
        }
    }
    
    • 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 backed by a NSFetchedResultsController . I would like
I have a UITableView with 3 empty rows. The user can select which text
I have a UITableView which sometimes has only a few rows. I would like
I have UITableView which contains cells. what I would like to do once user
I would like to have a UISearchBar on the top of my UITableView which
I have table in which i would like to tap on the cell and
I have an UITableView which includes a list of UITableViewCells. And I set the
I have a set of data in a matrix which I would like to
I have a UITableView which contain several cell. When I click a cell, I
I have a UITableView with 5 UITableViewCells . Each cell contains a UIButton which

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.