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

  • Home
  • SEARCH
  • 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 4565050
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:35:17+00:00 2026-05-21T18:35:17+00:00

In my app if user press on any cell in UITableView then accessoryType of

  • 0

In my app if user press on any cell in UITableView then accessoryType of cell will be set to check mark like following

-(void)Check:(UITableView *)tableView Mark:(NSIndexPath *)indexPath  
{  
[self.tableView cellForRowAtIndexPath:indexPath].accessoryType = UITableViewCellAccessoryCheckmark;  
     buttonCount++;  
    [selectedCellArray addObject:indexPath];  
} 

and if user press the same cell then uncheck will happen as follows

-(void)UnCheck:(UITableView *)tableView Mark:(NSIndexPath *)indexPath  
{  
[self.tableView cellForRowAtIndexPath:indexPath].accessoryType =   UITableViewCellAccessoryNone;  
    buttonCount--;    
     if (buttonCount == 0) {    

        [selectedCellArray removeAllObjects];  
    }  
}    

and i am calling this

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{  
if([tableView cellForRowAtIndexPath:indexPath].accessoryType == UITableViewCellAccessoryCheckmark)
    {  
        [self UnCheck:tableView Mark:indexPath];  
    }  
else  
    {  
        [self Check:tableView Mark:indexPath];

    }

Problem is when i am pressing on 1st cell it call Check method and mark the cell to but when i am scroll down i find 2-3 more cheked cell …even i did not select those cell…i dont know why and how it checked automatically …
i hope some one know where is the problem
thank you very much

  • 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-21T18:35:18+00:00Added an answer on May 21, 2026 at 6:35 pm

    Because cells will be reused by the tableview. Also set the checkmark/accessory type in your tableView:cellForRowAtIndexPath: method.

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

Sidebar

Related Questions

Is there anyway to close iphone app just like user press the menu key?
My app allows the user to press a button, it opens the camera, they
I'm building a count down timer app and I let the user press a
in my app i have three editText where the user can place a number.then.when
I would like to present information to the user of my app in a
In my app,user can select image from gallery and after that he can zoom
Currently I have this code var App = Ember.Application.create(); App.user = Ember.Object.create({ people: customers
Context: multi-user app (node.js) - 1 painter, n clients Canvas size: 650x400 px (=
in a J2EE app if user explicitly takes out the the ending page name
I'm developing web app that user can save his/her work to server. The data

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.