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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:32:34+00:00 2026-06-08T04:32:34+00:00

I have the answers showns in table view i want that if users selet

  • 0

I have the answers showns in table view i want that if users selet any of the cell is should get checkmarked image with text side and if mean time he selects another cell from first cell checkmark should be removed and shown on the selected

  • 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-08T04:32:36+00:00Added an answer on June 8, 2026 at 4:32 am

    In .h file create variable

    UItableviewCell *selectedCell;
    

    In didSelectRow method remove selection from saved cell and save new cell as selected:

    -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
        if (selectedCell) {
            selectedCell.accessoryType = UITableViewCellAccessoryNone;
        }
        UItableviewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
        if(cell.accessoryType == UITableViewCellAccessoryCheckmark) {
            cell.accessoryType = UITableViewCellAccessoryNone;
        else {
            cell.accessoryType = UITableViewCellAccessoryCheckmark;
        }
        selectedCell = cell;
    }
    

    To prevent problems with reusable cells u can create NSIndexPath variable instead of UITableViewCell in .h file:

    NSIndexPath *selectedCellIndexPath;
    

    and change didSelectRow method:

    -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
        [tableView scrollToRowAtIndexPath:selectedCellIndexPath atScrollPosition:UITableViewScrollPositionMiddle animated:NO];
        UITableViewCell *selectedCell = [tableView cellForRowAtIndexPath:selectedCellIndexPath];
        selectedCell.accessoryType = UITableViewCellAccessoryNone;
        UItableviewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
        if(cell.accessoryType == UITableViewCellAccessoryCheckmark) {
            cell.accessoryType = UITableViewCellAccessoryNone;
        else {
            cell.accessoryType = UITableViewCellAccessoryCheckmark;
        }
        selectedCellIndexPath = indexPath;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a php page that contains a table which i want to display
Other questions dealing with use of match_parent pre 2.2 have answers stating one should
I don't get this. I've searched everywhere and no one's answers have solved this
I have seen many answers on stackoverflow, but I didn't find an answer that
I have a set of tables that I would like to build a view
I have a standard UITableView. I want to set the shadowColor of the cell's
I have a table name Answers in my database with 5 columns _id, b1,
I have a link in each table row to view a record in more
I have a view with some embedded ruby in it... i want to insert
What are the technical questions I simply must have answers for before I approach

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.